|
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 how I propose to generate a walking bass line from a given chord chart. As a first step, we pick the note to play on the first beat of each bar, or the note to play under each chord if a bar contains more than one chord. Then we pick the notes to play in between each pair of these chosen notes as a separate subproblem. This should narrow the choices a lot because the root is often played on the first beat of each bar. There are exceptions but we can deduce rules to govern their occurrences. This technique should generate the type of bass lines found in method books and web sites such as this one and this other one.
Ive thought about the representation of rests in my class library today. The design decision Ive come to is to not represent them at all, since they dont carry any information other than their durations! Instead I now store the starting beat (and subdivisions) of each note as well as its duration in a sequence. So my
template <class T>
class Sequence : public std::list<trio<Beat, Duration, T> >
{
...
};
The trio class template is a generalization of pair. The tuple class template in the Boost class library can also be used but since its very simple to write, I decided to use my own.I also spent a little time looking at Boost.Python. It would be nice if my jazz theory classes can be used in Python! Unfortunately at this point theres no indication on the mailing lists that anyone manages to use Boost.Python on Mac OS X yet. I also found the paper Generating Rhythmic Accompaniment for Guitar: the Cyber-João Case Study by Dahia, Santana, Trajano, Sandroni, and Ramalho. Ill read it and report back soon.
I wrote some code today to deal with meters other than 4/4 time. Implementing it cleanly and generally is more difficult than one might think! Added a few header lines to my text file format to represent information like title, meter, key, and tempo. Herere the charts for Some Day My Prince Will Come and Take Five. Cant think of any other 3/4-time jazz tune. Certainly cant think of another 5/4-time tune and one in Ebm! Title: Some Day My Prince Will Come Meter: 3/4 Key: F Tempo: 90 | FMaj7 | A7#5 | BbMaj7 | Am7 _ D7 | | Gm7 | D7#5 | Gm9 | C9 | | FMaj7/A | Abdim | Gm7 | C7 | | FMaj7/A | Abdim | Gm7 | C7 | | FMaj7 | A7#5 | BbMaj7 | Am7 _ D7 | | Gm7 | D7#5 | Gm9 | C9 | | CMaj7 | F7 | Bb | Bdim | | FMaj7 _ F#dim | Gm7 _ C7 | F6 | _ C7 _ | | F6 | |
The design of time sequence containers I wrote about earlier for representing chord changes, bass lines, drum tracks, etc. works great. I ended up just calling the template | Eb6 Bb7 | Eb6 _ Fm7 Bb7 | Eb6 _ Bbm7 Eb9 | Ab G7#5 | | Cm7 Abm6 | Eb _ Am7 D7 | GMaj7 _ Abm7 Db9 | GbMaj7 _ Fm7 Bb7 | | Eb6 Bb7 | Eb6 _ Fm7 Bb7 | Eb6 _ Bbm7 Eb9 | Ab G7#5 | | Cm7 Abm6 | Eb _ Am7 D7 | Gm7 C7 Fm7 Bb7 | Eb6 | | Bbm7 Eb9 | Bbm7 _ Eb9 Eb7 | Bbm7 Eb9 | AbMaj7 | | Abm7 Db9 | GbMaj7 | Cm7 F7 | Fm7 Bb7b9 | | Eb6 Bb7 | Eb6 _ Fm7 Bb7 | Eb6 _ Bbm7 Eb9 | Ab _ _ G7 | | Cm7 Abm7 | Eb Cm7 D7 F#dim | Gm7 Cm7 Fm7 Bb7b9 | Eb6 |Notice how each bar contains one, two, or four entries, each of which may be a chord or an underscore. The latter serves as place holder to disambiguate the durations of the chords. For example in the bar containing the Ab and G7, the Ab lasts three quarter notes. Herere the last few bars of From This Moment On that show that one can omit the place holder entirely in a bar in which the previous chord (DbMaj7) repeats. | DbMaj7 | | Dbm7 | Gb9 | | Ab | Bdim | Cm7 | _ F7 | | Bb7 _ _ Bbm7/Eb | Eb _ _ Eb7 | Ab |Note also that slash chords are supported.
|
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 |