In my post on playing jazz piano from a lead sheet, I shared some melodic substitions rules that I learned from Shan Verma. If you have a melodic passage outlining a major third or minor third, up or down, Shan has some ornaments you can put there to add some movement and variety. His riffs were called triplet major (up/down), triplet minor (up/down), chromatic major (up/down), and standard minor (up/down). Now, I was a little bothered that I didn't know a Verma riff called standard major up or down. If he has one, it's not available in his free materials. Maybe if you pay for his courses. There also isn't a free chromatic minor up or down, but that didn't bother me as much. I want to know the standard stuff first.
So I made up some more riffs for major thirds. Suppose we're in 4/4 time and we go from C for two beats, up a major third to E for some amount of time, let's say also two beats. We'll replace the C with four eighth note and keep E with the same duration, giving us a new rhythm of [e e e e h]. Here are some pitch options and what I call the riffs:
[C B C D E] # standard major
[C D B C E] # enclosed major
[C D E Eb E] # neighbor major
I like all of these. What's more, if you play them in reverse, going from E down to C, I still like them, and continue to think the names are appropiate.
To put these and the other Verma riffs into code, I wrote some functions. One of them does diatonic offsets, i.e. given a pitch and a scale, it takes you up or down the scale by some number of notes. If the given note isn't in the scale, the first offset gets you back onto the scale on the nearest note in the direction you want to go (i.e. the nearest note changes depending on if the offset supplied to the function is positive or negative). I also wrote a function that finds chromatic offsets, which mostly just feeds a chromatic scale into the diatonic offset function.
With these functions, we can define the riffs relative to the start note in terms of scalar motion and chromatic motion. This is kind of cool because the riff can adapt depending on where you are in the scale: it doesn't have to have a fixed intervallic structure, though it also could. Like, if you're doing a riff over an ascending minor third in C major, the diatonic middle note could be a major second or a minor second up from the starting note.
[D, E, F] : [M2, m2]
[A, B, C] : [M2, m2]
[E, F, G] : [m2, M2]
[B, C, D] : [m2, M2]
And things get even crazier if your scales are microtonal.
In the major riffs I shared in terms of pitches, the standard major, the enclosed major, and the neighbor major, most of the pitches could be thought of as diatonic in C: neighbor major has a chromatic note, but the rest could come from a C major scale. But some of the B notes below C, maybe I should think of those as a chroamtic offset below the starting pitch. This is the difference between a standard major triad riff up on G in the key of C major looking like:
[G F G A B] or [G F# G A B]
I intend to try interpreting the B notes in both Standard Major and Enclosed Major as diatonic or chromatic offsets and see which one I like better.
...
I came up with some minor riffs:
[A, G#, A, B, C] # low neighbor minor
[A, B, C, D, C] # high neighbor minor
[A, B, G, A, C] # low enclosure minor
[A, B, D, B, C] # high enclosure minor
[A, B, C, B, C] # trill minor
I think the first three of these continue to sound very good in reverse, and the last two also sound okay. I'm going to code them all up.
I should probably add a few more figures with triplets too.
My plan is that I'll
1) generate a diatonic skeleton for a melody or bass line in terms of motions by 2nds and 3rds.
2) generate whichever of those I didn't in step 1, favoring contrary motion
3) hopefully find notes for two inner voices that fit with a chord
4) take turns ornamenting the melody or an inner voice with riffs from Verma and myself, hopefully respecting most species counterpoint rules, but I've made very boring music in the past by respecting all of them, so maybe I'll allow some violations. Generate a few and score them by their number of violations of soft rules or something. I don't know.
I don't know how to get interesting rhythmic variation.
I have an idea of representing a whole piece of music in terms of determinstic transformations, randomly selected. We'll see how far that gets.
...
Maybe I should be calling these embellishments or diminutions or variations instead of ornaments. I'm mostly calling them riffs though. It's fine.
...
Okay! I have four part harmony. That's totally trivial for me to generate. Chord, Chord, Chord, infinitely, voiced in SATB.
Then I can add one step of diatonic motion in half notes within that chord's measure for the upper voices and probably still satisfy counterpoint rules. Maybe all four voices.
Then I can embellish one upper voice at a time, usually the soprano. When I embellish another voice, it will be a response that's related to a previous soprano line by some kind of transformation - perhaps a new theme generated in contrary motion, perhaps an inversion of reversal or transposition or something.
The lower voices will usually be playing half notes at this point. Which is too boring. In the past, I have sometimes satisfied myself with the inner voices playing whole notes while an interesting melody and bassline move in contrary motion, but I want to figure out how to add some rhythm to inner lines, so let's try that now.
Suppose I put a generative distribution over beats and smaller subdivisions of each measure. It might look like "Note onsets are likely on [1, and_of_3, 4]. Somewhat likely on [2, a_of_4]". Every voice has two half note pitches per measure (generated by diatonic motion from the original SATB chord voicing for the measure and respecting species counterpoint rules), and they can associate these two pitches with the set of note onsets times produced by sampling the distribution. And then, uh, for note durations, you just run up to the next note onset, unless that would require a weird note length, and then a rest fills the gap.
So if the Alto's diatonic steps say to play G and then A, then the rhythm might go,
[G3,q G3,dq A3,e R,e R,s A3,s]
where I'm using a comma to combine a pitch and its note length (or a rest, R, and it's note length).
Once that's done, maybe we can go back and add passing notes or replace the A3 at the end with a chromatic approach to a note in the next measure of something.
...
I'm suddenly realizing that this post in called "ornaments over major third" but I'm now so far off on a tangent as to be outlining a whole generative music progam. But no one reads my blog, so I'll post what I want.
...
No comments:
Post a Comment