unclapping music and how to record stereo files.
Hi all. I've just published in my blog a little exercise in chuck. It's a reproduction of "clapping music" by steve reich. http://www.jesusgollonet.com/blog/?p=133 Although they're in the blog post, I'll put the code and audio in the wiki if there is interest. I have a question. How can i record stereo files in chuck? I haven't found anything in the reference. Thanks a lot best jesús gollonet http://www.jesusgollonet.com/blog/
Jesús, Someone should put this in the reference. The answer is (for stereo) to => the dac.left and dac.right to different left and right files. I use this to start recording: http://ravelite.org/code/chuck/stereo-rec.ck And this to stop recording: http://ravelite.org/code/chuck/stereo-rec-stop.ck Also, for multi-multi-channel, I explicitly make an array of channels and have my shreds play to the channels directly: http://ravelite.org/code/chuck/multi-rec.ck http://ravelite.org/code/chuck/multi-rec-stop.ck best, Graham On Tue, 25 Jul 2006, jesus gollonet wrote:
Hi all.
I've just published in my blog a little exercise in chuck. It's a reproduction of "clapping music" by steve reich.
http://www.jesusgollonet.com/blog/?p=133
Although they're in the blog post, I'll put the code and audio in the wiki if there is interest.
I have a question. How can i record stereo files in chuck? I haven't found anything in the reference.
Thanks a lot
best
jesús gollonet http://www.jesusgollonet.com/blog/
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
On Jul 25, 2006, at 2:50 PM, jesus gollonet wrote:
I've just published in my blog a little exercise in chuck. It's a reproduction of "clapping music" by steve reich.
http://www.jesusgollonet.com/blog/?p=133
Although they're in the blog post, I'll put the code and audio in the wiki if there is interest.
Cool! Totally! For fun, here is a modified version that uses shreds and built-in glottal pops (ahh and ooo). If you want, play with the shift period and factor, or add a third clapper. --- // our patch sndbuf clapper1 => dac.left; sndbuf clapper2 => dac.right; // load built-in sounds "special:glot_ahh" => clapper1.read; "special:glot_ooo" => clapper2.read; // the full "clapping music" figure [.5, .5, 1, .5, 1, 1, .5, 1 ] @=> float seq[]; // length of quarter note .36::second => dur quarter; // how many measures per shift 3 => int shift_period; // how much to shift by (in quarter notes) .5 => float shift_factor; // one clapper fun void clap( sndbuf buffy, int max, float factor ) { int shifts; int count; // infinite time loop for( ; ; shifts++ ) { // one measure for( 0 => count; count < seq.cap(); count++ ) { // set gain seq[count] => buffy.gain; // clap! 0 => buffy.pos; // let time go by if( !max || shifts < max || count != (seq.cap() - 1) ) seq[count]::quarter => now; else { <<< "shift!!!", "" >>>; seq[count]*factor*quarter => now; 0 => shifts; } } } } // spork one clapper, shift every shift_period measures spork ~ clap( clapper1, shift_period, shift_factor ); // spork, no shift spork ~ clap( clapper2, 0, 0 ); // infinite time loop while( true ) 1::day => now; --- Best, Ge!
On Jul 26, 2006, at 1:11 AM, Ge Wang wrote:
For fun, here is a modified version that uses shreds and built-in glottal pops (ahh and ooo).
Doh, already found a bug with the code I sent (shift comes one measure late). Here is a corrected version. --- // our patch sndbuf clapper1 => dac.left; sndbuf clapper2 => dac.right; // load built-in sounds "special:glot_ahh" => clapper1.read; "special:glot_ooo" => clapper2.read; // the full "clapping music" figure [.5, .5, 1, .5, 1, 1, .5, 1 ] @=> float seq[]; // length of quarter note .36::second => dur quarter; // how many measures per shift 3 => int shift_period; // how much to shift by (in quarter notes) .5 => float shift_factor; // one clapper fun void clap( sndbuf buffy, int max, float factor ) { 1 => int shifts; // infinite time loop for( ; ; shifts++ ) { // one measure for( 0 => int count; count < seq.cap(); count++ ) { // set gain seq[count] => buffy.gain; // clap! 0 => buffy.pos; // let time go by if( !max || shifts < max || count != (seq.cap() - 1) ) seq[count]::quarter => now; else { <<< "shift!!!", "" >>>; seq[count]*factor*quarter => now; 1 => shifts; } } } } // spork one clapper, shift every shift_period measures spork ~ clap( clapper1, shift_period, shift_factor ); // spork, no shift spork ~ clap( clapper2, 0, 0 ); // infinite time loop while( true ) 1::day => now; --- Best, Ge!
participants (4)
-
Ge Wang
-
Graham Coleman
-
jesus gollonet
-
Joe McMahon