**********************************Katherine Galbraith and Brad Sturges, Assignment 3***************************************************** ************************************************* Pre-Definiton ************************************************************ Our sliders allow users to play with beats on a mixed wave of sines and saws. ************************************************* Musical Idea ************************************************************ We wanted to create an interface that allowed the user to play with rhythms superimposed on some ramped waves. The user can control the rhythms using the beat of one sin wave and the beat of one sawtooth wave. The user can also shift the entire result along the y axis. ( // Here we define all the neccessary variables var w, verticalShift1, impulseRate1, impulseRate2; // This is the placement of the slider window w = GUIWindow.new("Sliders", Rect.newBy( 600, 88, 391, 200 )); // Here are the sliders from top to bottom and their functions verticalShift1 = SliderView.new( w, Rect.newBy( 55, 37, 128, 20 ), "SliderView", 0, -2, 2, 0.1,'linear'); impulseRate1 = SliderView.new( w, Rect.newBy( 55, 84, 128, 20 ), "SliderView", 10, 0.5, 50, 1, 'linear'); impulseRate2 = SliderView.new( w, Rect.newBy( 55, 129, 128, 20 ), "SliderView", 5, 0.5, 20, 1, 'linear'); // Here lie our sliders and their names StringView.new( w, Rect.newBy( 239, 37, 127, 25 ), "Vertical Shift"); StringView.new( w, Rect.newBy( 239, 84, 127, 25 ), "Beat 1"); StringView.new( w, Rect.newBy( 239, 129, 127, 25 ), "Beat 2"); // Here lie our ramped waves { s = Saw.ar(XLine.kr(400, 300, 20), 0.5, verticalShift1.kr) + SyncSaw.ar(XLine.kr(440, 330, 16), 500, 0.4, 0) + SinOsc.ar(XLine.kr(200, 500, 12), 0, 1, 0) + SinOsc.ar(XLine.kr(600, 300, 24), 0, 1, 0) // Here lie the waves we use for beats + SinOsc.ar(PulseCount.ar( Impulse.ar(impulseRate1.kr), Impulse.ar(2)) * 100, 0, 1) + Saw.ar(PulseCount.ar( Impulse.ar(impulseRate2.kr), Impulse.ar(6)) * 100, 2, 0); s * (1/4)}.scope; )