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.

29 lines
569B

  1. s = Server.local;
  2. s.waitForBoot {
  3. var synth, module;
  4. // Create the synth definition and load it
  5. module = SynthDef.new("module", {
  6. var mod, car, modPartial=2.401, carPartial=1, index=3, freq=440, mul=0.05;
  7. mod = SinOsc.ar(
  8. freq * modPartial,
  9. 0,
  10. 200
  11. );
  12. car = SinOsc.ar(
  13. (freq * carPartial) + mod,
  14. 0,
  15. 1
  16. );
  17. Out.ar(0, Disintegrator.ar(car, MouseX.kr(0, 1)));
  18. });
  19. module.load(s);
  20. s.sync;
  21. synth = Synth.new("module");
  22. };