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

21 行
651B

  1. s = Server.local;
  2. s.waitForBoot {
  3. var module, sound1, sound2;
  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", { arg hue, saturation, value;
  11. Out.ar(0, SinOsc.ar(hue));
  12. });
  13. module.load(s);
  14. // Make a sound
  15. sound1 = Synth.new("module", [\hue, 440, \saturation, 100, \value, 500]);
  16. sound2 = Synth.new("module", [\hue, 800, \saturation, 100, \value, 500]);
  17. };