Software over the rainbow

desearch and revelopment

Unclapping Music

So I have begun trying to learn chuck again.

To do it, I took alex maclean‘s advice to the letter:

…my best advice when looking for inspiration is to listen to your favorite pieces of music. Listen to the structure behind a piece and think about how you might write an algorithm to create that structure…

(From Hacking perl in nightclubs)

And that’s what I came up with:
Steve reich's

Clapping music is a piece by steve reich in which two performers repeat a simple pattern clapping their hands, with a little shifting every eight repetitions (for a better explanation see the wikipedia entry or watch a video).

The structure is so simple that I thought It would be a good starting point for a chuck exercise… And that’s what I did. Each “clapper” is on a stereo channel. The shifting occurs every 4th repetition.

See the code

Hear the result


Score image taken from crownpoint

Claps sound taken from freesound (thanks noisecollector).