( //Lee Roach, and Ryan DeRose //Assignment 3, Super Collider Project //We attempted a repeating series of sounds utilizing LFPulse, so that our sound repeated in an //organized manner. var w, t, speed, freq_phasor1, amp_phasor1, freq_saw, amp_saw, freq_LFTri, amp_LFTri, white_amp, gray_amp, pink_amp; //Our variables, all which change with sliders in our GUI, include the speed of our repeating pulse, //as well as the frequency and amplitude of all of our melodic and harmonic tones, and the //amplitude of our percussion noises. We wanted some kind of beat, with a band-like quality. //Essentially, we wanted it to sound like a cross between a marchingband and a video game. //In order to achieve this, we used repeating sets of 5 numbers, indicating RELATIVE values of amplitudes. //Maintaining sets of multiples of 5 for each sound maintained continuity in our repeating sequence. //We then included sliders to change ABSOLUTE amplitude, as well as frequency for our melodic and harmonic tones. w = GUIWindow.new("panel", Rect.newBy(128, 64, 326, 521)) .backColor_(rgb(0,0,0)); //These represent our sliders, and the values of the ranges for each variable within the sliders. speed = SliderView.new( w, Rect.newBy(11, 17, 214, 23), "SliderView", 5, 5, 10, 0, 'linear') .backColor_(rgb(37,39,176)).knobColor_(rgb(176,176,176)); freq_phasor1 = SliderView.new( w, Rect.newBy(14, 103, 128, 20), "SliderView", 200, 200, 600, 0, 'linear') .backColor_(rgb(131,176,40)).knobColor_(rgb(176,176,176)); amp_phasor1 = SliderView.new( w, Rect.newBy(16, 140, 128, 20), "SliderView", 0.1, 0.1, 1, 0, 'linear') .backColor_(rgb(45,176,65)).knobColor_(rgb(176,176,176)); freq_saw = SliderView.new( w, Rect.newBy(19, 206, 128, 20), "SliderView", 50, 50, 100, 0, 'linear') .backColor_(rgb(44,176,123)).knobColor_(rgb(176,176,176)); amp_saw = SliderView.new( w, Rect.newBy(22, 243, 128, 20), "SliderView", 0.1, 0.1, 1, 0, 'linear') .backColor_(rgb(104,176,26)).knobColor_(rgb(176,176,176)); white_amp = SliderView.new( w, Rect.newBy(28, 310, 128, 20), "SliderView", 0.1, 0.1, 1, 0, 'linear') .backColor_(rgb(176,30,47)).knobColor_(rgb(176,176,176)); gray_amp = SliderView.new( w, Rect.newBy(30, 337, 128, 20), "SliderView", 0.1, 0.1, 1, 0, 'linear') .backColor_(rgb(176,26,101)).labelColor_(rgb(176,176,176)).knobColor_(rgb(176,176,176)); pink_amp = SliderView.new( w, Rect.newBy(34, 366, 128, 20), "SliderView", 0.1, 0.1, 1, 0, 'linear') .backColor_(rgb(176,5,11)).knobColor_(rgb(176,176,176)); freq_LFTri = SliderView.new( w, Rect.newBy(37, 450, 128, 20), "SliderView", 500, 500, 800, 0, 'linear') .backColor_(rgb(48,176,15)).knobColor_(rgb(176,176,176)); amp_LFTri = SliderView.new( w, Rect.newBy(40, 487, 128, 20), "SliderView", 0.1, 0.1, 1, 0, 'linear') .backColor_(rgb(107,176,10)).knobColor_(rgb(176,176,176)); //Here we designate the name of each slider. The names come from the name of the sound within SuperCollider. StringView.new( w, Rect.newBy(17, 50, 128, 20), "speed") .backColor_(rgb(85,40,176)); StringView.new( w, Rect.newBy(160, 104, 128, 20), "freq_phasor1") .backColor_(rgb(176,124,26)); StringView.new( w, Rect.newBy(163, 141, 128, 20), "amp_phasor1") .backColor_(rgb(176,153,40)); StringView.new( w, Rect.newBy(165, 208, 128, 20), "freq_saw") .backColor_(rgb(176,112,33)); StringView.new( w, Rect.newBy(167, 247, 128, 20), "amp_saw") .backColor_(rgb(176,127,28)); StringView.new( w, Rect.newBy(170, 310, 128, 20), "white_amp") .backColor_(rgb(176,30,166)); StringView.new( w, Rect.newBy(172, 340, 128, 20), "gray_amp") .backColor_(rgb(176,14,89)); StringView.new( w, Rect.newBy(173, 369, 128, 20), "pink_amp") .backColor_(rgb(171,31,176)); StringView.new( w, Rect.newBy(177, 450, 128, 20), "freq_LFTri") .backColor_(rgb(176,149,14)); StringView.new( w, Rect.newBy(177, 488, 128, 20), "amp_LFTri") .backColor_(rgb(176,56,15)); Synth.play({ var t; t = LFPulse.ar(speed.kr); // this triggers our pulse wave to repeat, and changes with a slider Decay2.ar( // This sound seems as if it came right out of a nintendo game. The phasor was perfect //for that effect. ImpulseSequencer.ar(`[0,1,0,0,1], t), 0.001, 0.3, Phasor.ar(freq_phasor1.kr, amp_phasor1.kr)) + Decay2.ar( // This is obviously our base. The Sawtooth wave made it sound great. We dropped the //range of frequency to make it sound like the base. It almost sounds like a Tuba, dotting the 'i' // in "Script Ohio." ImpulseSequencer.ar(`[0,0,0,1,2,0,0,1,2,3], t), 0.001, 0.3, Saw.ar(freq_saw.kr, amp_saw.kr)) + Decay2.ar( // This is a snare drum. The white noise was awesome for this sound. ImpulseSequencer.ar(`[1.0,1.0,0,0,2.0,2.0,2.0,0,0,3.0,3.0,3.0,0,0,4.0,4.0,4.0,0,0,5.0], t), 0.001, 0.25, WhiteNoise.ar(white_amp.kr)) + Decay2.ar( // Tap, Tap, Tapping on our Chamber Door...quoth the Raven. ImpulseSequencer.ar(`[1,0,1,0,0,2,1,2,2,1], t), 0.001, 0.25, GrayNoise.ar(gray_amp.kr)) + Decay2.ar( // When the Beatles recorded "Here Comes the Sun," it was said that they used people with //boots on their feet, stomping on a wooden floor, to create a portion of the percussion. We think this //sounds pretty close. What about you? ImpulseSequencer.ar(`[0,1,0,1,1,0,2,2,0,1,0,0,4,3,2,2,3,2,2,1], t), 0.001, 0.25, PinkNoise.ar(pink_amp.kr)) + Decay2.ar( // This sounds like a Xylephone that would fit the Ohio State marching band, or Super Mario Bros. 3. ImpulseSequencer.ar(`[0,1,1,0,0,1,1,1,0,1], t), 0.001, 0.3, LFTri.ar(freq_LFTri.kr, amp_LFTri.kr)) }))