//*********************************************************************************************************************************** // // GETTIN' DIZZY WIT' IT // (also known as "Too Foo, or Not Too Foo?") // // by Ji-Soo Park and Nicole Plumail // //************************************************************************************************************************************ // // This program explores the wonderful possibilities of getting really dizzy from computer music; that is, // it generates two sinusoidal waves - the frequency of each independently modulated according to a slow sine function - and // mixes them together to two outputs, left and right. // Why stereo? Because we want to be GETTIN' DIZZY WIT' IT. Each sinusoidal wave is split into two outputs // through LinPan2, but the kicker is that this panning is modulated by yet another slow sine function. The effect is // that the frequencies oscillate up and down, and the output oscillates left and right. // The user can tweak with several controls. One slider called DizzFactor controls the panning "amplitude". Another // slider controls the rate of pitch modulation (or the frequency of the first "clock" sine function). Another controls the rate // of panning (or the frequency of the second "clock" sine function). // A fourth slider, dubbed TopPitch, controls the top frequency of the modulation. This is an attempt at // pushing beyond the realm of trip toys and toward "music". The idea is that, by tweaking with the top pitch, one // can create chords against the constant bottom pitch. This was done through varying the multiplier of the "clock" sine wave // modulating the frequency of the wave. The bottom frequency was kept constant through a simple linear relationship: since // we wanted to keep it constant at 220, we simply specified that the 'added constant' parameter of the clock wave be 220 plus // the multiplier. // There are entirely separate controls for the two waves, greatly increasing the range of possibilities. // Enjoy! // //************************************************************************************************************************************* ( //BUILDING THE GUI WINDOWS AND SLIDERS var w, slide1, slide2, slide3, slide4, w2, kslide1, kslide2, kslide3, kslide4; //Too Fresh window w = GUIWindow.new("Too Fresh", Rect.newBy( 700, 54, 300, 280 )).backColor_(rgb(176,68,67)); //DizzFactor slide1 = SliderView.new( w, Rect.newBy( 20, 40, 128, 20 ), "SliderView", 0, 0, 1, 0, 'linear'); StringView.new( w, Rect.newBy( 20, 15, 128, 20 ), "DizzFactor").backColor_(rgb(56,76,176)).labelColor_(rgb(255,255,255)); //PitchSpeed slide2 = SliderView.new( w, Rect.newBy( 20, 100, 128, 20 ), "SliderView", 0.2, 0.2, 5, 0, 'linear'); StringView.new( w, Rect.newBy( 20, 75, 128, 20 ), "PitchSpeed").backColor_(rgb(56,76,176)).labelColor_(rgb(255,255,255)); //PanSpeed slide3 = SliderView.new( w, Rect.newBy( 20, 160, 128, 20 ), "SliderView", 0.2, 0.2, 5, 0, 'linear'); StringView.new( w, Rect.newBy( 20, 135, 128, 20 ), "PanSpeed").backColor_(rgb(56,76,176)).labelColor_(rgb(255,255,255)); //TopPitch slide4 = SliderView.new( w, Rect.newBy( 20, 220, 200, 20 ), "SliderView", 110, 20, 400, 0, 'exponential'); StringView.new( w, Rect.newBy( 20, 195, 128, 20 ), "TopPitch").backColor_(rgb(56,76,176)).labelColor_(rgb(255,255,255)); //Foo Tresh window (same structure as Too Fresh) w2 = GUIWindow.new("Foo Tresh", Rect.newBy( 700, 400, 300, 280 )).backColor_(rgb(68,176,67)); kslide1 = SliderView.new( w2, Rect.newBy( 20, 40, 128, 20 ), "SliderView", 0, 0, 1, 0, 'linear'); StringView.new( w2, Rect.newBy( 20, 15, 128, 20 ), "DizzFactor").backColor_(rgb(56,76,176)).labelColor_(rgb(255,255,255)); kslide2 = SliderView.new( w2, Rect.newBy( 20, 100, 128, 20 ), "SliderView", 0.2, 0.2, 5, 0, 'linear'); StringView.new( w2, Rect.newBy( 20, 75, 128, 20 ), "PitchSpeed").backColor_(rgb(56,76,176)).labelColor_(rgb(255,255,255)); kslide3 = SliderView.new( w2, Rect.newBy( 20, 160, 128, 20 ), "SliderView", 0.2, 0.2, 5, 0, 'linear'); StringView.new( w2, Rect.newBy( 20, 135, 128, 20 ), "PanSpeed").backColor_(rgb(56,76,176)).labelColor_(rgb(255,255,255)); kslide4 = SliderView.new( w2, Rect.newBy( 20, 220, 200, 20 ), "SliderView", 110, 20, 400, 0, 'exponential'); StringView.new( w2, Rect.newBy( 20, 195, 128, 20 ), "TopPitch").backColor_(rgb(56,76,176)).labelColor_(rgb(255,255,255)); //CREATING THE TWO WAVES Synth.scope ({ var clock, clock2, kclock, kclock2, too, foo; clock = SinOsc.kr(ControlIn.kr(slide2), 0, ControlIn.kr(slide4), (ControlIn.kr(slide4)+220)); //Too Fresh pitch modulator: see comment top clock2 = SinOsc.kr(ControlIn.kr(slide3), 0, ControlIn.kr(slide1)); //Too Fresh pan modulator kclock = SinOsc.kr(ControlIn.kr(kslide2), 0, ControlIn.kr(kslide4), (ControlIn.kr(kslide4)+220)); //Foo Tresh pitchmod kclock2 = SinOsc.kr(ControlIn.kr(kslide3), 0, ControlIn.kr(kslide1)); //Foo Tresh panmod too = LinPan2.ar(SinOsc.ar(clock, 0, 0.5), clock2); //Too Fresh wave, freq modulated by clock, panning "amp" modulated by clock2 foo = LinPan2.ar(SinOsc.ar(kclock, 0, 0.5), kclock2); //Foo Tresh wave, with kclock and kclock2 doing the same as above Mix.ar ([too, foo]) //mixes the two waves to the same two outputs }).play )