Homework 4 - radio play

Sequence combining sound files and synth notes

Uses a sound file from monoStereoBinauralSpatializer.html and the string from effects-and-patterns/basicStringOrTube.html.

////////////////////////////////////////////////////
live code
fun void clip(string name) // define "clip" as a function { SndBuf2 mySnd => dac; // wire up a sound file reader and connect to the DAC mySnd.read(name); // specify the file name mySnd.length() => dur myDur; // get the duration <<< name, "is playing at", now/second, "for", myDur/second,"seconds">>>; myDur => now; // quit this shred after sound file's duration has passed } Impulse imp => DelayL d => dac; Gain fb; //OnePole lpf; // tube OneZero lpf; // string fb => d => lpf => fb; lpf.gain(-1.0); // octave 2.0::ms => d.delay; for (1 => int i; i < 17; i++) { spork ~clip("spatializer.wav"); // play each file once in a sequence of calls to clip (2.0/i$float)::ms => d.delay; imp.next(1.0); (4.0/i$float)::second => now; } while (true) 1::samp => now; // chuck forever, "stop" button finishes the recording and quits