// Frederick Strathmeyer's attempt at: /////////////// // Project 3 // /////////////// // Explanation: My patch mimicks the sound of waves, using spawn, // an envelope (which controls two things simultaneously), and a sinosc, // which is FM'ed by Pink noise. (no filters used!) // // The patch was supposed to have a GUI, which would allow the user to "play neptune" // and change the length of time between the waves, however I could find no way // to implement this (see my best attempt -- the middle section), and so the GUI // was abandoned in favor of random waves. // // A GUI was used in the development of the patch... and so that early version is // included (see the third section) for your entertainment and to show how I developed // the idea for the patch. Basically, I FM'ed a sin wave with pink noise and then // modified the amount of pink noise with a slider. "Hey!" I said, "That sounds kinda // like waves! I wonder..." and the rest is history. ////////////////////////////////////////////////////////// // Let's go to the ocean... it's 6am.. what the heck... // // ... yippee yay yahoo! // ////////////////////////////////////////////////////////// // Written by Frederick Carl Strathmeyer and some EBA's pizza ( var env; // variable for the envelope env = Env.linen(2, 0.5, 1, 1); // the envelope itself Synth.play({ Spawn.ar({ arg spawn; // dunno quite what this does, but it' necessary spawn.nextTime = (0.1*(26 + (6.rand))); // function (random) for the nextTime SinOsc.ar( 60 + PinkNoise.ar ( // frequency of the sine is modulated by pink noise EnvGen.kr(env,1, 0.1, 3000)), 0, // amount of modulation increases with envelope EnvGen.kr(env,1, 0, 1) ) }, // volume of the whole shabang inscreases with the same envelope 1,2,nil)}); ) ////////////////////////////////////////////////////////////////////////// // The original idea for the patch (why it doesn't work, i'm not sure): // ////////////////////////////////////////////////////////////////////////// // Also written by Frederick Strathmeyer and some EBA's pizza ( var w, howmuch, env; w = GUIWindow.new("panel", Rect.newBy( 182, 92, 400, 400 )); howmuch = SliderView.new( w, Rect.newBy( 120, 120, 128, 20 ), "SliderView", 2, 1.5, 3.5, 0.1, 'linear'); env = Env.linen(2, 0.5, 1, 1); Synth.play({ Spawn.ar({ arg spawn; spawn.nextTime = ControlIn.kr(howmuch); // why doesn't this work!? SinOsc.ar( 60 + PinkNoise.ar ( EnvGen.kr(env,1, 0.1, 3000)), 0, EnvGen.kr(env,1, 0, 1) ) }, 1, 2, nil)}); w.close ; ) /////////////////////////////////////////////////////////////// // A step along the developmental path (read: blind groping) // // towards the final patch. // /////////////////////////////////////////////////////////////// // Written by Frederick Strathmeyer and Marilyn Manson (communicating through portable CD player) ( var w, howmuch, env; w = GUIWindow.new("panel", Rect.newBy( 182, 92, 400, 200 )); StringView.new( w, Rect.newBy( 80, 60, 250, 20 ), "Touch the slider for funk-delicious fun!"); howmuch = SliderView.new( w, Rect.newBy( 120, 120, 128, 20 ), "SliderView", 0.1, 0.1, 3.5, 0.01, 'linear'); env = Env.linen(2, 0.5, 1, 1); Synth.play({ SinOsc.ar( 60 + PinkNoise.ar ( 1000*ControlIn.kr(howmuch)), 0, ControlIn.kr(howmuch) ) }); w.close; )