madewithlove / music-fns

a JavaScript music utility library that contains small music notation related functions.
MIT License
455 stars 14 forks source link

Chord progressions #27

Open geoffreydhuyvetters opened 6 years ago

geoffreydhuyvetters commented 6 years ago

any idea on how we could handle chord progressions?

https://en.wikipedia.org/wiki/Chord_progression

enjikaka commented 5 years ago

I've done the basics of this on https://plypp.net. There it's basically just a switch case returning the intervals (as midi number) between the root and the rest of the keys in the chord.

geoffreydhuyvetters commented 5 years ago

Need to re-write the intervals a bit first, thank for the help :)

enjikaka commented 5 years ago

Oh, read a bit closer now. This was about progression 🙈 I see music-fns already has some chords; done very similar to how I did it on Plypp! I do have some more chords though. Can make a PR for that if we want that in here? (And I can refactor my code out and use music-fns instead! )

geoffreydhuyvetters commented 5 years ago

That would be awesome :) Feel free to do so.

enjikaka commented 5 years ago

I don't quite get the naming in this repo though. Using the naming convention of MINOR_MAJOR_SEVENTH and MAJOR_SEVENTH etc will become very cumbersome when we do sus2, sus7, add11 etc. Can we just name them like they are in regular notation? Chord['sus2'] instead of Chord.SUSPENDED_SECOND?

geoffreydhuyvetters commented 5 years ago

Hmm, not sure. In the case of suspended, I get it.

But I think MAJOR / MINOR etc should be possible, no? We could create aliases Like I did for the intervals?

enjikaka commented 5 years ago

@duivvv Made a proposal here: https://github.com/madewithlove/music-fns/pull/50 :)