Rhythm as Pitch

Dan Tepfer wrote a very cool article about the relationship of rhythm and pitch. It can be found here: http://dantepfer.com/blog/?p=277 He used SuperCollider to make some cool audio examples.

I thought I would make a ChucK version of his idea and make it available to anyone who wanted to play with the ideas and find the rhythms of your favorite intervals, or hear the intervals of your favorite polyrhythm. (Read Dan’s post, he explains it well.)

I have written the code below, or you can download the .ck file from this link. (You may have to right-click “Save as…” depending on your browser)

//aim one Phasor at each speaker
Phasor a => dac.left;
Phasor b => dac.right;

//This number sets the gain. Don’t go over 1.0
0.5 => dac.gain;

1 => int i;

//This is the loop that increments the frequency values
while(i < 1000) { //adjust these denominators to make the ratio you want to hear i/2 => a.freq;
i/3 => b.freq;

//The smaller this number is the faster it moves
1.0::second => now;

i ++;

<<< i >>>;


ChucK is an audio programming language for Mac OS X, Windows and Linux. It is free and you can get it here: http://chuck.cs.princeton.edu/

Creative Commons License
This work by Jeff Albert is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Leave a Reply

Your email address will not be published. Required fields are marked *