//Music 220B Sound Logo, Assignment #0 //by Cat Davis (catdavis) //This sound logo is meant to act as a replacement for your alarm sound. //It has three parts, an exposition, climax, and resolution, which //are intended to cooperate in creating a motivating sound to wake up to. // write to a file dac => WvOut2 writer => blackhole; writer.wavFilename("/Users/catrian/Desktop/sound_logo.wav"); //Setup Mandolin one => dac; Mandolin two => dac; Mandolin three => dac; Mandolin four => dac; Mandolin five => dac; Mandolin six => dac; [150, 300, 600, 900, 1200, 1500] @=> int notes[]; //Durations 10::second => dur EXPOSTION1_TIME; 5::second => dur EXPOSTION2_TIME; //Exposition (peaceful wake-up) now + EXPOSTION1_TIME => time ex1_end; //longer while (now < ex1_end) { notes[(Math.random2(3, 5))] => one.freq; //higher pitches .4 => one.pluck; 1::second => now; } now + EXPOSTION2_TIME => time ex2_end; while (now < ex2_end) { notes[(Math.random2(0, 2))] => one.freq; //lower pitches .6 => one.pluck; //louder 700::ms => now; //faster } //Climax (converge to chord) for (0 => int i; i < 3; i++) { notes[i * 2] => one.freq; .8 => one.pluck; //louder 800::ms => now; notes[(i * 2) + 1] => two.freq; .8 => two.pluck; 800::ms => now; } //Resoultion (confident chord step-up to get ready to get out of bed) notes[0] => one.freq; .8 => one.pluck; notes[1] => two.freq; .8 => two.pluck; notes[2] => three.freq; .8 => three.pluck; 1::second => now; notes[3] => four.freq; .8 => four.pluck; notes[4] => five.freq; .8 => five.pluck; notes[5] => six.freq; .8 => six.pluck; 10::second => now;