ChordJS icon indicating copy to clipboard operation
ChordJS copied to clipboard

I've added some knowledge about common chords and chord progressions

Open laher opened this issue 13 years ago • 2 comments

Hi there,

I found your project while hoping to print off some chord progressions in different keys, and I saw your awesome library. Lovely. It only took me a couple of hours to get what I wanted from it.

So, I added 'chords-common.js', containing data about common chords and keys. Please also see common.html and progressions.html, for the sample pages I'll print off in the morning.

Note that I've left space in the data structure for alternate tunings, alternate fingerings (for each chord), and all the other chord 'families' (I've only defined single fingerings for major, minor and seventh chords so far). The naming of sharps/flats is a bit clunky, I could add a kind of 'alias' thing to beautify that a bit. I'm a beginner musician, so I couldn't think of a very mathsy way to represent keys, but this works fine for now.

No offence taken if you don't want this contribution, or you completely rewrite it - you probably already have other ideas of how to do what I just did, so no worries. In the meantime I'll probably take this further, and if you prefer I'm open to making it a completely separate project, with a dependency on ChordJS, if that's what you'd prefer.

Thanks very much for the great project. All the very best Am

laher avatar Nov 20 '12 11:11 laher

Fantastic! After I made this port the original author pointed me to his own JavaScript adaptation: https://github.com/einaregilsson/chord.js . Check it out because you might want to base your changes on his more idiomatic implementation. I ported this simply because I wanted a way to produce sheets of chord fingerings for my students without relying on a web service. And i didnt know he had alaready done the work. I would be happy to let you take this in any direction you want.

acspike avatar Nov 20 '12 12:11 acspike

OK great, thanks for the info. I see what you mean about chord.js being more idiomatic, but I do prefer one or 2 things about ChordJS. I prefer chord.js' 'span's, and the Ukelele support is good to have, but anyway these ideas were quick to add on.

So, I've decided to add a little more 'idiomatic' flavour, and then moved my more chord-library-like features to a new repository called ChordialJS.

Further changes to my fork

  • Added support for alternative markup, i.e. <span ...>B7</span>
  • Added Ukelele support (it accepts a variable number of strings)
  • Added an alternative name for the javascript object - 'ChordJS' (it's less likely to be overwritten)
  • Moved my chord library stuff into new repo, ChordialJS
  • removed JQuery dependency (nothing against JQuery, but it's not adding much)

New repo for my chord library & more

I've got some ideas for extending ChordialJS to do some cool stuff, so take a look after a while if you're interested. Nice meeting you, and thanks again.

laher avatar Nov 21 '12 09:11 laher