//------------------------------------------------------------------------ // name: X // desc: public class for globally-shared variables for 220b final project // This needs to be called for it all to work. // Running loadall.ck will prepare everything. //------------------------------------------------------------------------ public class X { // == global gain == static Gain @ out; static Gain @ outL; static Gain @ outR; static Gain @ in; // == events to control parameters == // thumbs up static Event @ thumbsUp; // thumbs down static Event @ thumbsDown; // start synthesis static Event @ synthesize; } // instantiate the gain new Gain @=> X.out; new Gain @=> X.outL; new Gain @=> X.outR; new Gain @=> X.in; X.in => X.out; // patch to dac X.out => Gain GLOBALGAIN => dac; 0.5 => GLOBALGAIN.gain; X.outL => dac.chan(0); X.outR => dac.chan(1); // == events to control parameters == // thumbs up new Event @=> X.thumbsUp; // thumbs down new Event @=> X.thumbsDown; // start synthesis new Event @=> X.synthesize; // wait around while( true ) 1::second => now;