Elm-music-theory: A toolkit for musical ideas

Thanks to everyone who has liked and responded. I feel very encouraged by the positive response to this package.

@evelios thanks for the kind words, and I’m looking forward to seeing what you build!

@FranzSkuffka @francescortiz I like your ideas! I think they agree with my own hopes for a computer-aided compositional environment of some kind, and I would like to hear more of this kind of thing.

I think the question you raised about finding chords that are appropriate to a particular musical moment is maybe both simple and difficult.

On the one hand, it would be simple to use the library to find all chords diatonic to a key, within some constraints; the Scale.allChords function will do that, given some basic knowledge of which chord types are involved.

And it is also simple to find all chords, again within some constraints, that include a particular pitch class (as in a melody note), using Chord.detect. Either of these approaches could provide material for doing reharmonizations, but the second would give you many more possibilities and probably be more useful.

I think the difficult part is making sense of those possibilities, of which there would be a lot. There are conventions for how chords can progress, but no strict rules. And I think harmonic progressions are most interesting when they strike a balance between satisfying and defying our expectations (I’m thinking right now of “The Girl From Ipanema”, a very popular song with chords that don’t resolve “correctly”).

Could chord options be sorted in some way from most “formulaic” to most “surprising”, for use in an application? That seems like a hard problem, but it would be interesting to see how you could approach it!