15 Jun
2006
15 Jun
'06
9:43 p.m.
This is in merit of the great tutorial at http://ravelite.org/chuck-notes/tutorial.html there is a little typo here: Now use this function to simulate indexing into the scale. [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 } this string: std.mtof( 48 + scale( mel[i%mel.cap()], major ) => inst.freq; //set the note lacks an ) should be std.mtof( 48 + scale( mel[i%mel.cap()], major )) => inst.freq; //set the note seeya .mike