Bläddra i källkod

Nice, nice

tags/kitchen
Pete Shadbolt 3 år sedan
förälder
incheckning
3cfebdf982
1 ändrade filer med 10 tillägg och 13 borttagningar
  1. +10
    -13
      audio.scd

+ 10
- 13
audio.scd Visa fil

@@ -10,7 +10,7 @@ s.waitForBoot {

// Create the synth definition and load it
module = SynthDef.new("module", {
arg hue, saturation, value, pan;
arg hue, saturation, value, pan, gain;
var oscillator, noise, filter, panner, mixer, frequency, qfactor, noise_level, osc_level;

// Calculate some parameters
@@ -24,7 +24,7 @@ s.waitForBoot {
filter = BPF.ar(noise, frequency, qfactor) * noise_level;
oscillator = SinOsc.ar(frequency) * osc_level;
mixer = Mix.ar([filter, oscillator]);
panner = LinPan2.ar(mixer, 2*pan - 1, value);
panner = LinPan2.ar(mixer, 2*pan - 1, gain);
Out.ar(0, panner);
});
module.load(s);
@@ -32,17 +32,14 @@ s.waitForBoot {

modules = [];
modules.add(Synth.new("module", [\hue, 0.5, \saturation, 0.9, \value, 0.5, \pan, 0.5]));
modules.add(Synth.new("module", [\hue, 0.9, \saturation, 0.9, \value, 0.5, \pan, 0.5]));
// Make a sound
// modules = [];
// 5.do({
// arg index;
// var synth;
// synth = Synth.new("module", [\hue, 0.5, \saturation, 0.1, \value, 0.5, \pan, 0.5]);
// modules.add(synth);
// });
// Create multiple sound generators
modules = [];
5.do({
arg index;
var synth;
synth = Synth.new("module", [\hue, 0.5, \saturation, 0.1, \value, 0.5, \pan, 0.5, \gain, 0.2]);
modules.add(synth);
});

// Hook up OSC
f = { |msg, time, addr|


Laddar…
Avbryt
Spara