Always-on computer music
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

25 行
752B

  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 = WhiteNoise.ar(0.5);
  15. filter = BPF.ar(noise, MouseX.kr(220, 1000), 0.3);
  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. };