ChucK babbleback machine implementation

Here is a 4 line implementation of the core babbleback functionality using the ChucK programming language [1]. Save this code to a file (say bb.ck) and execute it by running the command chuck bb.ck Note: This code may not work with the current windows binary of ChucK. It claims that it cannot subtract from an object.

 // Feed the microphone through a delay before sending to speakers
 adc => delayp d => dac;

 // I got a crash when I tried max = delay--no crash with one second extra
 // This configures the delay to be 3 seconds
 4::second => d.max;
 d.max - 1::second => d.delay;

 // infinite time loop
 while( true ) 1::second => now;

Here's what it would look like if you wanted really short delays:

 // Feed the microphone through a delay before sending to speakers
 adc => delayp d => dac;

 // Set max to 200 ms and the actual delay will be 200 - 100 = 100 ms
 200::ms => d.max;
 d.max - 100::ms => d.delay;

 // infinite time loop
 while( true ) 1::second => now;


Updated 13 Dec 2006, 04:36 GMT
Search - Recent Changes - 2 References - About Wikit - Go to The Babbleback Machine - Help
Sourceforge logo