Dueling Percussion is another Max/MSP Patch that I created for an electroacoustic music course instructed by Arne Eigenfeldt at SFU. (previously)
The idea is simple. Imagine having two snare drummers facing each other. One plays a bar-long rhythm, then the other responds by playing a similar but slightly embellished rhythm. They trade back and forth, continually attempting to outdo the other.
Now imagine that one of the snare drummers is a computer. This MaxMSP patch listens (through a mic) to a rhythm being played, quantizes it, changes it slightly, then plays it back a bar later.
For this to work, though, both the human and the computer have to agree to a tempo, so this patch incorporates a tap-tempo metronome. To start, the human does a count-off by clicking sticks four times. The computer interprets the tempo and starts a metronome.