Hello everyone. I’m in the process of creating a harmonizer extension based of MusicEngine, and I’d like to share a simple experiment I made to see how MEChord handles very long progressions when set into a loop.
The MEChord class is one of the tools I’m working on now. It creates all valid chord realizations given a symbol and a set or rules. Additionally the class may also take, as argument, a previous chord, a rule profile and number of voices:
MEChord.new(symbol, prevChord, ruleProf, voiceNum)
To test a very long progression I used an analysis I made of Chopin’s Etude Op.10, Nº1, that had all the chord symbols written down. A total of 92 chords across the entire etude:
// Chords
~p = [
"C", "F", "F#-7o5", "D7", "G", "D7", "Dm3P4d5m7", "G7", "GM3A5m7", // S1
"C", "F", "F#-7o5", "Gs4", "G", "Cs2", "C", // S2
"F^7", "Bo", "B-7o5", "E7", "A-", "A-7", "F^7", "BFr", "Es4", "E", // S3
"A7", "DM2P4P5m7", "D7", "GP4P5m7", "G7", "C7", "C-7o5", "F7", "Ab-", // S4
"Bb7", "EFr", "A", "A", "D7", "GP4P5m7", "G7", "C^7", "FA4P5M7", "F^7", // S5
"B-7o5", "E-7", "A-7", "D-7", "G7", "C^7", "F^7", "B-7o5", "B7", "E", "E", "G7", // S6
"C", "F", "F#-7o5", "D7", "G", "D7", "D-7o5", "G7", "GM3A5m7", // S7
"C", "F", "F#-7o5", "F#o7", "Gs4", "G", "D7", "F7", "BFr", // S8
"E", "D-7", "G7", "C", "C7", "F#o7", "Bo7", "C", "F#o7", "Bo7", // S9
"Eo7", "F#m3d6d7", "F#o7", "D-7o5", "G7", "C" // S10
];
// Durations
~d = [
4, 2, 1.5, 0.5, 2, 2, 2, 1.5, 0.5, // S1
4, 2, 2, 2, 2, 2, 2, // S2
2, 1, 1, 2, 1, 1, 2, 2, 2, 2, // S3
2, 1.5, 0.5, 2, 2, 2, 2, 2, 2, // S4
2, 2, 2, 2, 2, 1.5, 0.5, 2, 1.5, 0.5, // S5
2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1.5, 0.5, // S6
4, 2, 1.5, 0.5, 2, 2, 2, 1.5, 0.5, // S7
4, 2, 1, 1, 2, 2, 2, 1, 1, // S8
4, 2, 2, 1, 1, 1, 1, 2, 1, 1, // S9
2, 1.5, 0.5, 2, 2, 4 // S10
];
And, much to my surprise, I was able to do it by calling MEChord inside a simple loop:
~r = Array.new(~p.size);
~v = 5;
~p.do { |c, i|
var temp;
temp = if ( i == 0 ) {
MEChord(c, prevChord: nil, voiceNum: ~v).chords.choose;
} {
MEChord(
c,
prevChord: ~r[i - 1],
ruleProf: [enforceUnisonProhibition: false, enforceChordPosition: true],
voiceNum: ~v
).chord;
};
~r.add(temp);
};
And this is what it sounds like:
To play the progression I created a simple FM synth with an organ sound, inspired by one of Eli Fieldsteel’s tutorials on FM. My main purpose was to be able to hear the chord changes clearly as a test.
The code is available at sc_musicengine_harmonizer/experiments/experiment02.scd:
(The repo is a bit messy still, and the README is outdated, sorry. Will get to that soon)
If you find these type of projects interesting I’d love to know your thoughts…
All the best!