// change the relationships between amps., two closely related sines // lp ( { x = Line.kr(0.001, 1, 8); s = SinOsc.ar(220, 0, x); t = SinOsc.ar(225, 0, 1 - x); (s + t) * 0.5 }.scope ) // similar, but add a simple gui to two sine waves... play with beats... ( var w, s1, s2, n1, n2; w = GUIWindow.new("Runnemeede sine waves", Rect.newBy( 128, 64, 409, 140 )) .backColor_(rgb(166,17,176)); s1 = SliderView.new( w, Rect.newBy( 43, 45, 128, 20 ), "SliderView", 220, 5, 20000, 1, 'linear') .backColor_(rgb(166,17,176)).knobColor_(rgb(176,155,49)); s2 = SliderView.new( w, Rect.newBy( 44, 84, 128, 20 ), "SliderView", 221, 5, 20000, 1, 'linear') .backColor_(rgb(176,44,79)).knobColor_(rgb(176,97,47)); StringView.new( w, Rect.newBy( 188, 50, 136, 17 ), "Sine wave 1 frequency ") .backColor_(rgb(49,100,176)); StringView.new( w, Rect.newBy( 190, 85, 138, 17 ), "Sine wave 2 frequency ") .backColor_(rgb(63,112,176)); n1 = NumericalView.new( w, Rect.newBy( 334, 49, 64, 20 ), "NumericalView", 220, 5, 20000, 1, 'linear'); n2 = NumericalView.new( w, Rect.newBy( 335, 83, 64, 20 ), "NumericalView", 221, 5, 20000, 1, 'linear'); StringView.new( w, Rect.newBy( 117, 13, 197, 24 ), "Let's get with da' beat!!!!") .backColor_(rgb(60,161,176)); n1.action = { s1.value = n1.value }; s1.action = { n1.value = s1.value }; n2.action = { s2.value = n2.value }; s2.action = { n2.value = s2.value }; { s = SinOsc.ar(ControlIn.kr(s1)); t = SinOsc.ar(ControlIn.kr(s2)); (s + t) * 0.5 }.scope )