|
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.
|
A Computational Model for Comping
|
Thursday April 1, 2004
I wasnt able to find a concrete set of rules for comping that can be readily implemented by a computer program. So I needed to devise one on my own. When I was taught to comp on the guitar, I was basically shown a few patterns and then asked to mix it up and improvise.
Syncopation plays an important role in comping. More specifically, anticipating a chord an eighth note (triplet) before it starts pushes the tune along and breaks up the monotony. But when should we introduce an anticipation? We should neither do it too often nor too seldomly. A good candidate for anticipation is a chord that has the same root as the one preceeding it (this brings rhythmic interest where the harmony is stable) and the V (or I) chord in a ii-V (V-I) sequence (were anticipating that chord anyway!). Of course even when one of these criteria is satisfied, we may randomly choose to employ anticipation or not.
The other consideration for generating good comping seems to be the amount of syncopation in any given section of the tune. Playing on the beat produces stability while playing off the beat produces syncopation. Too much of either makes the accompaniment unbalanced. A good variety patterns and randomization seem to take care of this quite well.
Here then is an example of an accompaniment for Blues for Alice generated using to the above rules. Humanization (varying timing and dynamics) has not been implemented yet, and chord voicings and the drum track are unfinished. But the accompaniment sounds reasonably nice.
Tuesday March 30, 2004
The implementation of piano comping wasnt too difficult, once a good design was worked out. A class for representing rhythmic patterns was introduced. Each rhythmic pattern is just a list of beat-duration pairs. An interesting extension to Beat objects is that beats can now be negative, denoting a chord that is played before the first beat of a bar.
is denoted by
const RhythmicPattern RP45(Beat1And, DurationEighthNote,
Beat3, DurationQuarterNote);
and
is denoted by
const RhythmicPattern RP48(BeatPickup4And, DurationQuarterNote,
Beat2And, DurationEighthNote);
After some experimentation, I now think the choice of which rhythmic patterns to play for each chord needs to be made more carefully for the piano part to sound nice. A completely random set of choices sound, well, random! Ive reverted to much simpler rules in the generation of this accompaniment for Blues for Alice so that the output sounds more acceptable but quite plain. Back to the drawing board for a method to choose rhythmic patterns.
|
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
|