Always-on computer music
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324
  1. s = Server.local;
  2. s.waitForBoot {
  3. var module, sound;
  4. // Connect to OSC
  5. thisProcess.openUDPPort(5005);
  6. n = NetAddr.new("0.0.0.0", 5005);
  7. o = OSCFunc({ arg msg, time, addr, recvPort; [msg, time, addr, recvPort].postln; }, '/radio', n);
  8. OSCFunc.trace(true);
  9. // Create the synth definition and load it
  10. module = SynthDef.new("module", {
  11. arg hue, saturation, value;
  12. var oscillator, noise, filter;
  13. oscillator = SinOsc.ar(MouseX.kr(220, 1000));
  14. noise = PinkNoise.ar(1);
  15. filter = BPF.ar(noise, MouseX.kr(220, 1000), 0.0001);
  16. Out.ar(0, filter);
  17. });
  18. module.load(s);
  19. // Make a sound
  20. sound = Synth.new("module", [\hue, 440, \saturation, 100, \value, 500]);
  21. };