I’m having problems with sending audio signal to multiple busses.
~icecrush = Routine({
var out = {|...indices| // Accept a variable number of arguments
if (indices.size == 1) {
~mixBus[indices[0]]; // Single bus selection
} {
indices.collect {|index| ~mixBus[index] }; // Multiple bus selection
}
};
var reverb = {|...indices| // Accept a variable number of arguments
if (indices.size == 1) {
~reverbSendBus[indices[0]]; // Single bus selection
} {
indices.collect {|index| ~reverbSendBus[index] }; // Multiple bus selection
}
};
var delay = {|...indices| // Accept a variable number of arguments
if (indices.size == 1) {
~delaySendBus[indices[0]]; // Single bus selection
} {
indices.collect {|index| ~delaySendBus[index] }; // Multiple bus selection
}
};
5.do({|icecrush|
[3, 4, 2.5, 5, 6].collect({|i, n|
x = Synth(\icebreak, [\freq, i, bpf: i*500, duration: rrand(5, 10), \amp, 5.dbamp, \bpf, rrand(120, 600), \shape, rrand(0.9, 2.3), \trig, rrand(0.2, 0.8),
\fxSend1, out.(1, 5), \fxSend1vol, 0.5]);
});
The function works as a standalone and if i write out.(1,6) it will indeed output the value ~mixBus[1] and ~mixBus[6]. But when used on that synth it’s not working at all. I only get sound on ~mixBus[1].
SynthDef(\icebreak, {
var snd, env, duration, freqEnv, freqshift, freq, shape;
freq = \freq.kr(2);
shape = \shape.kr(0.1);
duration = \duration.kr(1);
env = Env.perc(\atk.kr(0.01), duration).ar(Done.freeSelf);
freqEnv = Env([0.1, 0.63, 0.3, 0.2, 0.4, 0.1], [freq/2, freq, freq*1.4], curve: \sin);
freqshift = EnvGen.kr(freqEnv, Impulse.kr(\trig.kr(0.2)));
snd = SinOsc.ar(PinkNoise.ar(800) * freqshift) * \amp.kr(-10.dbamp);
snd = BPF.ar(snd, \bpf.kr(300) * EnvGen.kr(Env([shape, shape/2, shape*1.3, shape*1.03, shape*1.4, shape*2, shape*1.5, shape*4], [0.1, 1, 0.5, 0.3]), Impulse.kr(20)), 0.6);
//snd = snd + Ringz.ar(CombC.ar(snd, 0.2, 0.2), 300*freqshift * 2, 0.1, 0.03);
snd = snd * env;
Out.ar(\fxSend1.kr(nil), (snd*\fxSend1vol.kr(nil)));
Out.ar(\fxSend2.kr(nil), (snd*\fxSend2vol.kr(nil)));
Out.ar(\fxSend3.kr(nil), (snd*\fxSend3vol.kr(nil)));
Out.ar(\fxSend4.kr(nil), (snd*\fxSend4vol.kr(nil)));
}).add;
Is it not possible to send to multiple busses in one Synth parameter?
The reason I created this setup was because I have already written tons of events and routines for a project. So I wanted to be able to do a quick change without having to rewrite all of my SynthDefs or rewrite all of my routines completely. Now I have just changed from \fxSend1, ~mixBus[1] to \fxSend1, out.(1, 5) because I want the synth to send to both ~mixBus[1] and ~mixBus[5].
Hope that someone have a simple solution that can help me solve this.