SndBuf mySound_ohm_singing_cool2_cut2 => dac; "/Users/hannahleechoi/Documents/hw3_final_submit/seedWav/62562__thanvannispen__ohm-singing-cool2-cut2.aiff" => string filename_ohm_singing_cool2_cut2; //Lasts for 48 seconds fun void ohm_singing_cool2_cut2() { // tell SndBuf to read this file filename_ohm_singing_cool2_cut2 => mySound_ohm_singing_cool2_cut2.read; //Asks the sound how long it is (in samples). mySound_ohm_singing_cool2_cut2.samples() => int numSamples; // set gain 1.0 => mySound_ohm_singing_cool2_cut2.gain; // play sound from the beginning 0 => mySound_ohm_singing_cool2_cut2.pos; 0.0::second => dur HOLD_TIME; //numSamples/1 => dur HOLD_TIME; now + HOLD_TIME => time end; //end = 3 + now while (now < end) { 1 - (end-now) / HOLD_TIME => float progress; for (0 => int i; i < 60; i++) { 5.0 * Math.pow(progress, 3) => mySound_ohm_singing_cool2_cut2.gain; } 10 ::ms => now; } numSamples :: samp => now; // Play for whole duration, but backward. } repeat(0) { ohm_singing_cool2_cut2(); } while(true) { ohm_singing_cool2_cut2(); }