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.

3 anni fa
123456789101112131415161718192021222324252627
  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 noise, crackle, mixer, oscillator, filtered_noise, tone, frequency, noise_level, qfactor, osc_level;
  7. tone = MouseX.kr(1, 0);
  8. frequency = MouseY.kr(200, 2000);
  9. qfactor = (tone)**4;
  10. osc_level = 1 - tone;
  11. noise_level = 1 - tone;
  12. oscillator = SinOsc.ar(frequency) * osc_level;
  13. crackle = Crackle.ar(tone + 1, 0.5);
  14. noise = WhiteNoise.ar(1);
  15. filtered_noise = BPF.ar(noise, frequency, qfactor) * noise_level;
  16. mixer = Mix.ar([crackle, filtered_noise]);
  17. Out.ar(0, mixer);
  18. });
  19. module.load(s);
  20. s.sync;
  21. synth = Synth.new("module");
  22. };