-
Notifications
You must be signed in to change notification settings - Fork 0
08 Chords and harmony

Here, the handy Music::Chord::Note module is used.
Another option, if wanting to construct guitar chords, is to use the MIDI::Chord::Guitar module.
Sometimes a dyad (2-note "chord", like the I and V notes) suffices to give the impression that chords are happening if there is a melodic line, which effectively adds the third note.
Say we have a chord like C major (C4-E4-G4), and we want the first or second inversion. Sure, we could just rewrite it to be E4-G4-C5 or G4-C5-E5. But that's not programming (and in this case, gymnastics).
Perform Neo-Riemannian operations on major and minor triads, and seventh chords with the excellent Music::NeoRiemannianTonnetz module.
Here are examples: transform & transform-chain & transform-chords
This is what we are really after. Here is an example of a randomized state machine that selects chords from the major scale using the default settings of the Music::Chord::Progression module: