Busses again …
So venturing into the next and crucial chapter of busses , still following eli’s tutorials
I have a basic Fm synth and a reverb
The output of the synth is set to bus 30 (argument for bus out ) , the input of the reverb same channel (argument bus in ) , and output to bus 0
The reverb is processing both dry and wet , but that’s not relevant here
Assigning the reverb to a variable and sequencing the Synth et voila we have a functioning reverb
Following elis tutorrial introducing ~variable=Audiobus(server,numchannels )
I assigned a variable called ~bus=Audiobus ,and put these both in the reverbsynth parameter settings , and the two op synth pbind
Looking at the scope it appears that this overrides the channel nr .30
Executng the same variable a few times , creates new busses ( see screenshot , new busses created up to audio 22 ).
So , I am correct in thinking that with each execution ( and thus creating of new bus ) the synth is automatically routed to that new buss assignment ?
At least , the scope shows it does , but there is also a signal present on bus 3-4 whcih are normally reserved for audio in
How is this possible ?
Also how can we check which bus nr channel whas created without creating a new one , adding the .value method just creates a new bus and thus reroutes it
Edit , this is easily fixed by just executing the variable without a declaration , it shows the assigned busses
And also , can we change the assigned bus for that variable ?
Here’s the file
Most importantly why is there signal present on bus channel 3??
(
SynthDef(\Reverberate,
{
|in=30,out=0,mix=1|
var signal,processed;
signal=In.ar(in,2);
processed=FreeVerb.ar(signal,mix:mix);
processed=(signal+processed)*0.5;
Out.ar(out,processed);
}).add
)
~revv=Synth(\Reverberate,[\in,~bus]);
~revv.free
~revv.pause;
~revv.resume
~bus=Bus.audio(s,2).value
(
SynthDef(\twoop,
{
|fmamt=2,modoffset=24,moatt=0.001,modrel=0.500,ampatt=0.001,amprel=0.800,pitch=48,outt=0.3,pan=0.2,feed=0.2,out=30|
var mod,modenv,ampenv,carr;
mod=SinOscFB.ar((pitch+modoffset).midicps,feedback:feed)*fmamt;
modenv=EnvGen.ar(Env.perc(moatt,modrel),doneAction:0);
ampenv=EnvGen.ar(Env.perc(ampatt,amprel),doneAction:2);
carr=SinOsc.ar(pitch.midicps,(mod*modenv))*ampenv*outt;
carr=Pan2.ar(carr,pos:pan);
Out.ar(out,carr);
}).add
);
/////////
(
Pdef(
\crt,
Pbind(
\instrument,
\twoop,
\pitch,Pseq([40,40,40,49,37,42,42,54],inf)-2,
\dur,Pseq([1/4,1/4,1/2,1/4],inf),
\fmamt,Prand([2,1,3,10,2,10,2,3,4,11],inf),
\modrel,Prand([0.425,0.525,0.500,0.550,1,0.625,0.500,0.5,0.8],inf),
\modoffset,Prand([12,0,12,24],inf),
\feed,Pwhite(0.3,0.5,inf),
\pan,Prand([-0.3,0,0.3],inf),
\amprel,Pwhite (0.08,0.3,inf),
\out,~bus,
)
)
)
//////////
Pdef(\crt).stop;///////////FM
Pdef(\crt).play(t);
t=TempoClock(126/60).permanent_(true);
s.newBusAllocators;