|
About Andrew Choi
MIDI Programs
MIDI File Player (External Device)
MIDI Destination Pop-Up Button
Other Programs Cocoa Sample Programs Syntax Coloring Using Flex Algorithms Jazz Chord Analysis as Optimization
|
A blog where I will write mostly about programming in Cocoa and CoreMIDI, and experiences from my ports of Emacs and XEmacs to the Mac OS.
Heres a bass line for Blues for Alice generated by the latest version of my program. | F3 A3 C4 D4 | E4 Ab3 A3 D#4 | D4 F3 G3 D3 | C3 F#3 F3 D#4 | | D4 C4 Bb3 B3 | Bb3 E3 Eb3 A#3 | A3 D#3 D3 Abb2 | Ab2 Abb3 Ab3 Db3 | | G2 A2 Bb2 C#3 | C3 D3 E3 Fb3 | F3 Db3 D3 A2 | G2 Cb2 C3 C3 |The program uses only a simple formula for generating notes for chords lasting the entire bar. A better program should probably implement a number of these formulas and apply them when conditions are suitable. Heres how the notes of a bar are currently chosen. The forth note is simply an approach note, chosen in the manner I described a few days earlier. The third note is a chord note between the first notes of this bar and the next bar. The second note is a scale note between the first and the third note. Implementing this procedure using the jazz theory classes quickly reveals how well (or poorly) their interfaces have been designed. Subproblems such as list all chord notes of Fmaj7 between F3 and E4 must be specified easily with the classes. This actually raises a number of interesting design questions for supporting the kinds of questions that may be asked about the musical objects being represented. These arent explored in any detail by class library designs documented in the literature.
I wrote quite a bit of code today, so therell only be time for a short entry. Heres a bass line the current version of my program generates for three choruses of Blues for Alice. | F3 | E3 Bb2 A2 C3 | D3 A2 G2 Db3 | C3 G2 F2 B2 | | Bb2 | Bb3 E3 Eb3 Ab3 | A3 C4 D4 A3 | Ab3 Gb4 F4 Db4 | | G3 | C3 | F3 E3 D3 A2 | G2 Db3 C3 Bb2 | | A2 | E3 G2 A2 Db3 | D3 Ab2 G2 D3 | C3 Gb2 F2 A2 | | Bb2 | Bb3 E4 Eb4 G3 | A3 Eb3 D3 A2 | Ab2 Gb3 Ab3 Db3 | | G3 | G2 | F2 Eb3 D3 F3 | G3 Db4 C4 Gb3 | | F3 | E3 G3 A3 E3 | D3 F3 G3 D3 | C3 D3 C3 F3 | | Bb2 | Bb3 D3 Eb3 Bb2 | A2 Eb3 D3 Gb3 | Ab3 B2 Db3 C3 | | D3 | C4 | F3 C3 D3 A2 | G2 D3 C3 C3 |The chord chart is of course: | FMaj7 | Em7b5 A7 | Dm7 G7 | Cm7 F7 | | BbMaj7 | Bbm7 Eb7 | Am7 D7 | Abm7 Db7 | | Gm7 | C7 | FMaj7 Dm7 | Gm7 C7 |Notice that only chords lasting two beats are handled at the moment. Since tonality analysis is performed on the chords, the program always chooses diatonic approach notes correctly.
Suppose weve selected the first note to play for each chord as I suggested last week. How do we choose the other notes in the walking bass line were constructing? Lets first consider the simple case when therere two chords per bar. | Bb Gm7 | Cm7 F7 | Bb ...Lets say the previous step of our algorithm has chosen to play the roots of all the chords. The chromatic approach note for the second Bb is A (below) or B (above). Since were in the tonality of Bb, the diatonic approach note is (also) A (below) or C (above). Note that an Ab will imply a different tonality and is not as good a choice. Thats why I believe programs that dont perform tonality analysis of the chord changes cannot possibly make a correct decision here. Fortunately, for my program, Ive already worked out such a tonality analysis algorithm a few weeks ago. Sometimes candidates for the approach note will coincide with chord notes of C1. E.g., in the previous example, A and C are the third and fifth of F7, respectively. In such a case, the approach note serves dual purposes, which may be reason for us to give it a higher preference. Of course approach notes can also be played as the last note for chords longer than two beats. For such chords, theres more freedom in the choices of the other notes (wide open is more accurate). I hope to write about this soon.
|
Lists
Less-Known Facts About Emacs
Chinese Restaurants in Calgary
Calgary/Banff Tourist Attractions
Top-10 Reason I Stopped Working on Emacs
Misc
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright © 2003, 2004, 2005 Andrew Choi (Contact Information). | Created with FCBlog |