浏览代码

Nice

master
Pete Shadbolt 2 年前
父节点
当前提交
d78b6ac074
共有 1 个文件被更改,包括 7 次插入3 次删除
  1. +7
    -3
      audio.scd

+ 7
- 3
audio.scd 查看文件

@@ -15,10 +15,10 @@ s.waitForBoot {
var oscillator, noise, filter, panner, mixer, frequency, qfactor, lagtime, output, amplitude;

// Dynamic time of the module
lagtime = 10 / (2**(octave/8));
lagtime = 100 / (2**(octave/8));

// 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 * Scale.major.ratios[(hue * 12).asInteger];
//frequency = (130 * frequency) * (2**octave);
@@ -72,10 +72,14 @@ s.waitForBoot {
f = { |msg, time, addr|
if(msg[0] == '/radio') {
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(\saturation, msg[3]);
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));
}
}
};


正在加载...
取消
保存