My OS X Programming Blog
Mac OS X Cocoa and CoreMIDI Programming
About Andrew Choi


MIDI Programs

MIDI File Player (External Device)

MIDI Destination Pop-Up Button

MIDI File Player (Internal Synth)

MusicSequence Sample Code

MIDI File Writer

MIDI Name Document Parser

NameConfigSetup

Fish Creek MIDI Framework

MidnamUtility

SysExSenderX

Other Programs

FCBlogEditor

FCBlog and Patch

Chinese Checkers Program

jyut6 ping3 Cantonese Input Method

Cocoa Sample Programs

Syntax Coloring Using Flex

NSTextField and Undo

NSToolbar

Implementing File Import

Launch Application and Open URL

Saving Uncommitted Text Field Edits

Algorithms

Jazz Chord Analysis as Optimization

Optimal Line Breaking for Music

Optimal Chord Spacing

   

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.

Band-in-a-Box File Format
Thursday February 19, 2004

I’m interested in generating walking basslines from chord charts. I’ve spent a little time to read all the literature I can find on automatic composition. Unfortunately that seems to help quite little. Some papers’ goals were more ambitious than mine. Some don’t describe their methods concretely enough to be followed in an implementation.

I’ve also studied basslines generated by Band-in-a-Box (BiaB) and MiBAC Jazz. I hoped to gain some insights into how these programs work. BiaB really does appear to choose preprogrammed sequences (i.e., licks) randomly, according to odd and even bars, whether we’re currently in section A or B, or whether we’re at the end of a section. Since it doesn’t coordinate the choices among bars, large intervals occur quite often between consecutive bars. The jazz styles also play a lot of roots and fifths, making the output sound more like rock than jazz. MiBAC generates much better bass lines. They’re simple and their contours are quite smooth. Most of the time it plays quarter notes. Occasionally a note is doubled up for rhythmic interest.

Then I was distracted by another problem. Since many people post chord charts (e.g., of jazz standards) to the Web in BiaB format, I thought my programs should be able to read it. This format is proprietary, and I couldn’t find any specifications for it. So I spent most of yesterday figuring it out! Boy, I haven’t used the hex editor so much in quite a while :-). Anyway I now have a program that can read (the chord chart portion of) any of the BiaB files I’ve found on the Web! For instance, these are the first few lines of its output for a file I found at one of the BiaB sites:

Song: * I Left My Heart In San Franciso  Key = Bb  Tempo = 135
| BbMaj7 | F7 | BbMaj9 | Bb6 |
| Cm7 | F7 | BbMaj9 | F9/G |
| Am7b5 | D7b9 | Gm | Gm7#5 |
| C9sus | C9 | F9sus | F9 |
| Cm7b5 | | Gm7b5 | Gb9 |
| F | D7 | C9sus C9 | F9sus Bdim |
| F9 F9/D Cm7 C#dim/C | BbMaj9 | Gm7 C#dim/C | Cm7 |
...
This can then be read by my chord sequence tonality analysis program. I just need to first add all the new chord definitions to it.

Tie-Breaking Heuristics
Tuesday February 17, 2004

If we simply minimize the sum of differences between consecutive scales in the dynamic programming algorithm, breaking ties arbitrarily, often the most natural choices of scales for a chord sequence will be overlooked. So we need to adjust a term in the cost function in three cases: for ii-V, V-I, and Lydian mode over a major chord.

To see how well this algorithm works, compare its output for Here’s That Rainy Day with that of THoTH, its output for Body and Soul with that of THoTH, and its output for Autumn Leaves with that of JSSS.

I’ve also been reading about automatic composition in the past few days. I’m interested in generating the bass lines of an accompaniment. Since automatic composition is a big topic, this is taken a lot of time. Even more unfortunate, all the papers I manage to find aren’t specific in the description of their methods. So I won’t quote or write about them. I’ll probably need to devise my own method again.

February 2004
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29
Jan  Mar

xml

Search this blog with


Lists

Less-Known Facts About Emacs

Emacs Rants

Chinese Restaurants in Calgary

Calgary/Banff Tourist Attractions

C++ Reading List

Science Fiction Series

Top-10 Reason I Stopped Working on Emacs

Top-10 Types of Questions I Get About Emacs

10 Defining Moments as Programmer


Misc

Carbon XEmacs

Emacs for Mac OS X


Copyright © 2003, 2004, 2005 Andrew Choi (Contact Information). Created with FCBlog