Closed daveyarwood closed 8 years ago
On second thought, if we gave build-chord
a dual purpose as described above (variable number of intervals vs. chord name), there would be some ambiguity, e.g. :A11
could be either an augmented 11th or an A11 chord (A-C#-E-G-B-D).
To get around this, we can make the function always take 2 args, and if the second arg is a collection, e.g. (build-chord :Bb4 [:m3 :M3])
, then we know they are supposed to be intervals, and if it's a single argument, e.g. (build-chord :A3 :A11)
then we know it's supposed to be a chord name.
Added in 0.3.0.
Building upon #12, we can write a function that, given a tonic note and any number of note intervals, it builds the chord.
e.g.
This would pave the way for a function (maybe just an overloaded version of this function?) that takes a tonic note and a chord name and returns the notes in the chord, e.g.