Homework 4 - radio play

Spatialization comparisons, use headphones or ear buds

Four soundfiles need to be preloaded -- mono.wav, stereo.wav, binaural.wav, spatializer.wav -- the first three were recorded with different kinds of mics and the last was created by feeding a mono file into the Ambisonic Spatializer and capturing the result of moving it manually.

// for something more dramatic in the live code, add more clips and reduce their spacing for (0 => int i; i < names.size()*2; i++) { // play through the set of sound files twice spork ~clip(names[i % names.size()]); // need to use % so the set of names repeats 1::second => now; }
////////////////////////////////////////////////////
live code
["mono.wav", "stereo.wav", "binaural.wav", "spatializer.wav"] @=> string names[]; 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 } for (0 => int i; i < names.size(); i++) { spork ~clip(names[i]); // play each file once in a sequence of calls to clip 4::second => now; } while (true) 1::samp => now; // chuck forever, "stop" button finishes the recording and quits