( //Code By BJ Lucas and Ryan Mannix. //May 4th, CC12 //Our piece strikes at a fundamental chord in aesthetics-- simplicity. Our goal was not to impress you with our prowess in computer programming, or even spelling, but to create a piece that can stand as a paradigm for the future of human communication. //We started off our GUI using a Pulse function, to create a "square" wave. The first GUI allows freq, width, amp, and offset controls, //then we added a sine function with the same perameters except instead of width changes we added phase. By adding the functions, we can manipulate either through a simple twitch of the mouse; //variables var w, freq, width, amp, dc_offset, freq_sin, phase_sin, amp_sin, dc_offset_sin, pulseFreqSlider, pulseWidthSlider, pulseAmpSlider, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p; //window w = GUIWindow.new("panel", Rect.newBy(207, 49, 561, 535)) .backColor_(rgb(6,15,135)); //sliders for Pulse wave a=freq=SliderView.new( w, Rect.newBy(9, 46, 364, 28), "SliderView", 20, 20, 3000, 0, 'exponential') .backColor_(rgb(176,0,0)).knobColor_(rgb(6,230,14)); b=width=SliderView.new( w, Rect.newBy(11, 102, 363, 29), "SliderView", 1, 0, 2, 0, 'linear') .backColor_(rgb(176,0,0)).knobColor_(rgb(6,225,17)); c=amp=SliderView.new( w, Rect.newBy(15, 158, 363, 32), "SliderView", 0, 0, 3, 0, 'linear') .backColor_(rgb(176,7,7)).knobColor_(rgb(11,220,21)); d=dc_offset=SliderView.new( w, Rect.newBy(14, 224, 365, 34), "SliderView", 0, -1, 1, 0, 'linear') .backColor_(rgb(176,1,4)).knobColor_(rgb(11,227,22)); //labels for pulse wave StringView.new( w, Rect.newBy(17, 24, 128, 20), "frequency") .labelColor_(rgb(255,243,250)); StringView.new( w, Rect.newBy(20, 79, 128, 20), "band width") .labelColor_(rgb(241,240,255)); StringView.new( w, Rect.newBy(20, 136, 128, 20), "amplitude") .labelColor_(rgb(255,255,255)); StringView.new( w, Rect.newBy(24, 201, 128, 20), "dc_offset") .labelColor_(rgb(250,255,252)); //labels for entire window StringView.new( w, Rect.newBy(22, 292, 128, 20), "frequency") .backColor_(rgb(5,13,127)).labelColor_(rgb(250,255,252)); StringView.new( w, Rect.newBy(25, 350, 128, 20), "phase shift") .labelColor_(rgb(248,252,255)); // sliders for sine wave e=freq_sin=SliderView.new( w, Rect.newBy(23, 317, 355, 29), "SliderView", 20, 20, 3000, 0, 'exponential') .backColor_(rgb(255,0,8)).labelColor_(rgb(10,26,255)).knobColor_(rgb(10,26,255)); f=phase_sin=SliderView.new( w, Rect.newBy(25, 376, 355, 23), "SliderView", 0, 0, 1, 0, 'linear') .backColor_(rgb(255,7,16)).knobColor_(rgb(10,26,255)); g=amp_sin=SliderView.new( w, Rect.newBy(27, 431, 354, 26), "SliderView", 0, 0, 3, 0, 'linear') .backColor_(rgb(255,2,11)).knobColor_(rgb(10,26,255)); h=dc_offset_sin=SliderView.new( w, Rect.newBy(26, 491, 353, 24), "SliderView", 0, -1, 1, 0, 'linear') .backColor_(rgb(255,11,7)).knobColor_(rgb(10,26,255)); //labels for sine wave StringView.new( w, Rect.newBy(28, 405, 128, 20), "amplitude") .labelColor_(rgb(248,252,255)); StringView.new( w, Rect.newBy(30, 465, 128, 20), "dc_offset") .labelColor_(rgb(248,248,255)); StringView.new( w, Rect.newBy(23, 268, 128, 20), "Sine Wave") .labelColor_(rgb(245,248,255)); StringView.new( w, Rect.newBy(18, 4, 128, 20), "Pulse Wave") .labelColor_(rgb(248,255,252)); i=NumericalView.new( w, Rect.newBy(397, 49, 64, 20), "NumericalView", 20, 20, 3000, 0, 'linear'); j=NumericalView.new( w, Rect.newBy(390, 105, 64, 20), "NumericalView", 1, 0, 2, 0, 'linear'); k=NumericalView.new( w, Rect.newBy(399, 167, 64, 20), "NumericalView", 0, 0, 3, 0, 'linear'); l=NumericalView.new( w, Rect.newBy(403, 235, 64, 20), "NumericalView", 0, -1, 1, 0, 'linear'); m=NumericalView.new( w, Rect.newBy(402, 324, 64, 20), "NumericalView", 20, 20, 3000, 0, 'linear'); n=NumericalView.new( w, Rect.newBy(400, 379, 64, 20), "NumericalView", 0, 0, 1, 0, 'linear'); o=NumericalView.new( w, Rect.newBy(397, 435, 64, 20), "NumericalView", 0, 0, 3, 0, 'linear'); p=NumericalView.new( w, Rect.newBy(396, 494, 64, 20), "NumericalView", 0, -1, 1, 0, 'linear'); a.action={i.value=a.value}; i.action={a.value=i.value}; b.action={j.value=b.value}; j.action={b.value=j.value}; c.action={k.value=c.value}; k.action={c.value=k.value}; d.action={l.value=d.value}; l.action={d.value=l.value}; e.action={m.value=e.value}; m.action={e.value=m.value}; f.action={n.value=f.value}; n.action={f.value=n.value}; g.action={o.value=g.value}; o.action={g.value=o.value}; h.action={p.value=h.value}; p.action={h.value=p.value}; //function Synth.scope({Pulse.ar(Plug.kr(a), Plug.kr(b), Plug.kr(c), Plug.kr(d)) + SinOsc.ar(Plug.kr(e), Plug.kr(f), Plug.kr(g), Plug.kr(h))}); w.close )