// @title BinauralPlayer.ck // @author Robert Colcord\ // @desc Plays "scored" four-channel radioplay in binaural for 220a HW #2 // @note shred Binaural4.ck before shredding //define filepath for sound files "/user/r/rcolcord/Library/Web/220a/hw2/" => string myDir; // Load wav files, send to appropriate binaural input, or dac channel as necessary // Music played in earbuds, thus not appropriate for binaural processing // and sent straight to dac channels 0 and 1 SndBuf CBL => dac.chan(0); myDir + "CocoaButterKissesLeft.wav" => CBL.read; // SndBuf CBR => dac.chan(1); myDir + "CocoaButterKissesRight.wav" => CBR.read; // Sound effects: front-left, front-right, back SndBuf SEFL => Binaural4.input[0]; myDir + "SoundEffectsFL.wav" => SEFL.read; SndBuf SEFR => Binaural4.input[1]; myDir + "SoundEffectsFR.wav" => SEFR.read; SndBuf SEB => Binaural4.input[2]; SEB => Binaural4.input[3]; myDir + "SoundEffectsBack.wav" => SEB.read; // Song being played from laptop in back-left SndBuf Lost => Binaural4.input[2]; myDir + "Lost.wav" => Lost.read; // Dialogue. // Friend 1 is left space, Friend 2 is in right // Birdo is first-person, thus not appropriate for binaural, sent straight to dac // channels 0 and 1 // Jenny is heard through a telephone in the right ear, thus not appropriate for // binaural, sent straight to dac channel 1 SndBuf Friend1 => Binaural4.input[0]; myDir + "Friend1.wav" => Friend1.read; SndBuf Friend2 => Binaural4.input[1]; myDir + "Friend2.wav" => Friend2.read; SndBuf Birdo => dac.chan(0); Birdo => dac.chan(1); myDir + "Birdo.wav" => Birdo.read; SndBuf Jenny => dac.chan(1); myDir + "Jenny.wav" => Jenny.read; // Set initial positions and gains CBL.gain(0.5); CBR.gain(0.5); SEB.gain(0.6); SEFL.samples() => SEFL.pos; SEFR.samples() => SEFR.pos; Birdo.samples() => Birdo.pos; Friend1.samples() => Friend1.pos; Friend2.samples() => Friend2.pos; Lost.samples() => Lost.pos; Jenny.samples() => Jenny.pos; // Score section. // The following sections move time forward. Wav file gains are turned on // and played from the necessary position as they enter the radiodrama 1452637::samp => now; SEFL.gain(1.0); SEFR.gain(1.0); SEFL.pos(0); SEFR.pos(0); 174270::samp => now; Birdo.gain(0.7); Birdo.pos(0); 236830::samp => now; Friend1.gain(1.0); Friend1.pos(0); 101962::samp => now; Friend2.gain(1.0); Friend2.pos(0); 581770::samp => now; Lost.gain(0.15); Lost.pos(0); 1783617::samp => now; Lost => Binaural4.input[3]; // Navigates to back-center Lost.gain(0.5); 124368::samp => now; Jenny.gain(0.8); Jenny.pos(0); 2926700::samp => now;