Open stevengj opened 5 months ago
See e.g. lilypond's chord-naming facilities.
There is also the tension between an abstract notion of a chord as a collection of intervals (e.g. "dominant seventh chord"), independent of particular set of notes, and versus its realization with a particular root (e.g. "G7"), versus the even more specific notion of a particular voicing.
And of course there are other systems of naming chords, e.g. the "ii7" chord, that are relative to the choice of tonic.
It's a bit hard to pin down what functionality you want here, since it depends a lot on what you want to use it for.
It would be awesome if this could be achieved!
I think discussing the implementation of so many features in the same issue might cause confusion.I suggest opening separate issues to discuss individual features step by step.
I think the first step is to perfect the calculation of intervals so that we can subsequently construct any chord structure we want.(I haven't tried this package yet, so I don't know if the interval calculation function is fully complete.)
It seems a lot of things could be added to the chord support.
is_triad
correctly works for inversions or other voicings that scramble the note order?make_triad
is tied to a scale, whereas it would be natural to have an interface that lets you specify a root note, major/minor/diminished/augmented, and optionally an inversion, since very often you want a chord that borrows from another mode and it would be annoying to always have to create a new scale every time you use a chord with accidentals.is_triad
doesn't seem to recognize augmented triads?It might be nice to have a function like
make_chord(root, major/minor/diminished/augmented, extensions..., inversion=...)
where extensions could be scale degree like7, 9, …
, with some keyword arguments to indicate voicings like inversions, though to have complete freedom over voicing you might still have to specify it as just a set of notes in some cases. Would also be nice to be able to specify standard chord symbols in some natural way, e.g.C9/G
orEm*add9
.Would also be nice to be able to be able to take a set of notes and a given root note and identify a conventional name for the chord, although sometimes this is not unique, and the naming can differ based on the genre of music (e.g. classical vs. jazz/popular vs. more esoteric branches of music theory). e.g. if you give the set
{G,A,C,E}
and a root noteA
, then it should identify it asAm7/G
, whereas if you give the same set and a root noteC
it should identify it asC6/G
(in jazz/pop notation).