|
@@ -15,10 +15,10 @@ s.waitForBoot { |
|
|
var oscillator, noise, filter, panner, mixer, frequency, qfactor, lagtime, output, amplitude; |
|
|
var oscillator, noise, filter, panner, mixer, frequency, qfactor, lagtime, output, amplitude; |
|
|
|
|
|
|
|
|
// Dynamic time of the module |
|
|
// Dynamic time of the module |
|
|
lagtime = 10 / (2**(octave/8)); |
|
|
|
|
|
|
|
|
lagtime = 100 / (2**(octave/8)); |
|
|
|
|
|
|
|
|
// Oscillator/filter frequency |
|
|
// Oscillator/filter frequency |
|
|
frequency = (notefreq * (1.0 + (hue*0.02))) * (2**(octave-1)); |
|
|
|
|
|
|
|
|
frequency = (notefreq * (1.0 + (hue*0.08))) * (2**(octave-1)); |
|
|
//frequency = (130 + (hue * 130)) * (2 ** octave); |
|
|
//frequency = (130 + (hue * 130)) * (2 ** octave); |
|
|
//frequency = 130 * Scale.major.ratios[(hue * 12).asInteger]; |
|
|
//frequency = 130 * Scale.major.ratios[(hue * 12).asInteger]; |
|
|
//frequency = (130 * frequency) * (2**octave); |
|
|
//frequency = (130 * frequency) * (2**octave); |
|
@@ -72,10 +72,14 @@ s.waitForBoot { |
|
|
f = { |msg, time, addr| |
|
|
f = { |msg, time, addr| |
|
|
if(msg[0] == '/radio') { |
|
|
if(msg[0] == '/radio') { |
|
|
if(msg[1]<modules.size){ |
|
|
if(msg[1]<modules.size){ |
|
|
|
|
|
var octave, note; |
|
|
|
|
|
octave = (2 - (msg[1] / 4).floor); |
|
|
modules[msg[1]].set(\hue, msg[2]); |
|
|
modules[msg[1]].set(\hue, msg[2]); |
|
|
modules[msg[1]].set(\saturation, msg[3]); |
|
|
modules[msg[1]].set(\saturation, msg[3]); |
|
|
modules[msg[1]].set(\value, msg[4]); |
|
|
modules[msg[1]].set(\value, msg[4]); |
|
|
modules[msg[1]].set(\note, Scale.major.degreeToFreq((msg[2]*12).floor, 48.midicps, octave)); |
|
|
|
|
|
|
|
|
note = (msg[2]*12).floor; |
|
|
|
|
|
"Note %\n".postf(note); |
|
|
|
|
|
modules[msg[1]].set(\note, Scale.major.degreeToFreq(note, 48.midicps, octave)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|