HW1 - spork it! TWICE!!

...with some different suggested parameterizations.

////////////////////////////////////////////////////
suggestions
fun void go(int updateRate, float freqOffset, int chan) { SinOsc osc => dac.chan(chan); // play the data with a sine wave for (0 => int i; i < nVals; i++) { osc.gain (0.15); // reduce gain because we'll be layering more generators osc.freq(vals[i]*1000+freqOffset); // data values in range 0 - 1 updateRate::ms => now; } } spork ~ go(100, 200, 0); // left side 1500::ms => now; spork ~ go(150, 300, 1); // slower, higher, right side
////////////////////////////////////////////////////
live code
50::ms => now; // start after 50ms fun void go() { SinOsc osc => dac; // play the data with a sine wave osc.gain (0.25); // reduce gain because we'll be layering more generators for (0 => int i; i < nVals; i++) { osc.freq(vals[i]*1000+200); // data values in range 0 - 1 100::ms => now; } } spork ~ go(); 1500::ms => now; spork ~ go(); // always keep this main shred alive (like with this infinite loop) while (true) 1::ms => now; // keep the main shred alive so we don't quit