From c96a934d2124b6f7ed2781a69b6fd2377bc3fdce Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Mon, 3 May 2021 16:40:20 -0700 Subject: [PATCH] Making some progress --- audio.scd | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/audio.scd b/audio.scd index eadb07a..9a9876d 100644 --- a/audio.scd +++ b/audio.scd @@ -6,18 +6,21 @@ s.waitForBoot { thisProcess.openUDPPort(5005); n = NetAddr.new("0.0.0.0", 5005); o = OSCFunc({ arg msg, time, addr, recvPort; [msg, time, addr, recvPort].postln; }, '/radio', n); - OSCFunc.trace(true); + //OSCFunc.trace(true); // Create the synth definition and load it module = SynthDef.new("module", { arg hue, saturation, value; - var oscillator, noise, filter; - oscillator = SinOsc.ar(MouseX.kr(220, 1000)); - noise = PinkNoise.ar(1); - filter = BPF.ar(noise, MouseX.kr(220, 1000), 0.0001); - Out.ar(0, filter); + var oscillator, noise, filter, panner, mixer; + noise = WhiteNoise.ar(1); + filter = BPF.ar(noise, MouseX.kr(220, 1000), MouseY.kr(0, 1)**4, MouseY.kr(2, 0.1)); + oscillator = SinOsc.ar(MouseX.kr(220, 1000)) * MouseY.kr(0.5, 0); + mixer = Mix.ar([filter, oscillator]); + panner = LinPan2.ar(mixer, 0.0); + Out.ar(0, mixer); }); module.load(s); + s.sync; // Make a sound sound = Synth.new("module", [\hue, 440, \saturation, 100, \value, 500]);