multichannel busses without array args?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

multichannel busses without array args?

mousaique
hello list,

is it possible to route multichannnel busses without declaring array arguments or using namedcontrol? (meaning with all arrays language side, e.g. in pmonos)

for instance in the following example, to have synth "two" expand to 8 upon receiving the input array declared in the pmono?

thank you for advice!



q= Bus.audio(s, 8);

(
SynthDef(\one, {| out,freq|

Out.ar(out,SinOsc.ar(freq)
)
}).add;)

(
SynthDef(\two, {|input|
Out.ar(0,Splay.ar(input))
}).add);


(
p=Pspawner({ | sp |
sp.par(Pmono(\two,
\dur,1,
\input, Pfunc{(0..7).collect { |i| q.subBus(i).asMap }},
\addAction, \addToTail,
));
loop {
var pat=(
Pmono(
\one,
\dur,1,
\freq,Pfunc{Array.fill(8,{arg i; 100*(i+1)})},
\out,Pfunc{(0..7).collect { |i| q.subBus(i) }},
\addAction, \addToHead,
);
);sp.seq(pat)};
}
).play;)
Reply | Threaded
Open this post in threaded view
|

Re: multichannel busses without array args?

daniel-mayer

Am 12.02.2018 um 19:36 schrieb [hidden email]:

hello list,

is it possible to route multichannnel busses without declaring array arguments or using namedcontrol? (meaning with all arrays language side, e.g. in pmonos)


You'd need a bus arg, e.g.


(
q = Bus.audio(s, 8);

SynthDef(\one, { |out, freq|
Out.ar(out, SinOsc.ar(freq, 0, 0.1) * EnvGen.ar(Env.asr))
}).add;

SynthDef(\two, { |in|
Out.ar(0, Splay.ar(In.ar(in, 8)))
}).add
)


(
p = Pspawner({ | sp |
sp.par(Pmono(\two,
\dur, inf,
\in, q,
\addAction, \addToTail,
));
sp.seq(Pmono(\one,
\dur, inf,
\freq, (1..8) * 100,
\out, q.index + (0..7),
\addAction, \addToHead,
));
}
).play;
)

s.scope(14)


Regards

Daniel

-----------------------------
http://daniel-mayer.at
-----------------------------
Reply | Threaded
Open this post in threaded view
|

Re: multichannel busses without array args?

mousaique
that easy! thank you daniel :)

On Mon, Feb 12, 2018 at 9:30 PM, <[hidden email]> wrote:

Am 12.02.2018 um 19:36 schrieb [hidden email]:

hello list,

is it possible to route multichannnel busses without declaring array arguments or using namedcontrol? (meaning with all arrays language side, e.g. in pmonos)


You'd need a bus arg, e.g.


(
q = Bus.audio(s, 8);

SynthDef(\one, { |out, freq|
Out.ar(out, SinOsc.ar(freq, 0, 0.1) * EnvGen.ar(Env.asr))
}).add;

SynthDef(\two, { |in|
Out.ar(0, Splay.ar(In.ar(in, 8)))
}).add
)


(
p = Pspawner({ | sp |
sp.par(Pmono(\two,
\dur, inf,
\in, q,
\addAction, \addToTail,
));
sp.seq(Pmono(\one,
\dur, inf,
\freq, (1..8) * 100,
\out, q.index + (0..7),
\addAction, \addToHead,
));
}
).play;
)

s.scope(14)


Regards

Daniel

-----------------------------
http://daniel-mayer.at
-----------------------------