problem with chuck-notes tutorial
Hi I'm having a problem with the "chuck-notes" tutorial (http://ravelite.org/chuck-notes/tutorial.html). In section 1.3 (Flexible scales) I pasted the examples into the attached file, with which chuck reports: [atte@aarhus chuck-notes]$ chuck tut_04.ck [tut_04.ck]:line(24).char(64): syntax error Am I missing something obvious here? -- peace, love & harmony Atte http://www.atte.dk | quartet: http://www.anagrammer.dk http://www.atte.dk/gps | compositions: http://www.atte.dk/compositions //connect a plucked string to the soundcard out StifKarp inst => dac; fun int scale(int a, int sc[]) { sc.cap() => int n; //number of degrees in scale a/n => int o; //octave being requested, number of wraps a%n => a; //wrap the note within first octave if ( a<0 ) { //cover the negative border case a + 12 => a; o - 1 => o; } //each octave contributes 12 semitones, plus the scale return o*12 + sc[a]; } [0,2,3,1,4,2,6,3,4,4] @=> int mel[]; //sequence data [0,2,4,5,7,9,11,12] @=> int major[]; //major scale for (0=>int i; ; i++) { //infinite loop std.mtof( 48 + scale( mel[i%mel.cap()], major ) => inst.freq; //set the note inst.noteOn( 0.5 ); //play a note at half volume 300::ms => now; //compute audio for 0.3 sec }
Atte André Jensen wrote:
I'm having a problem with the "chuck-notes" tutorial (http://ravelite.org/chuck-notes/tutorial.html).
Not anymore, please ignore... -- peace, love & harmony Atte http://www.atte.dk | quartet: http://www.anagrammer.dk http://www.atte.dk/gps | compositions: http://www.atte.dk/compositions
participants (1)
-
Atte André Jensen