RedMixer create and hold multiple RedMixerChannel
A mixer that can mix any number of channels into one or more subgroups.
req: Conductor quark
see also: RedMixerChannel, RedMixerGUI, RedEffectsRack, RedMatrixMixer
class methods:
*new(inputChannels, outputChannels, group, lag)
inputChannels - array of input channels. default [[0, 1], [2, 3], [4, 5], [6, 7]].
a maching array of RedMixerChannel channels will be created.
outputChannels - array of output channels. default [[0, 1]]
a maching array of RedMixerChannel mixers will be created (think subgroups).
group - nil boots the default server and creates a group after the defaultGroup.
note: passed in groups are not freed when this RedMixer instance is freed.
lag - for eq settings, balance and volume. in seconds. default= 0.05.
instance methods:
mixer
see <mixers. shortcut for mixers[0] as in the normal case only this one mixer is used (no subgroups).
free
free synths and, if created, the internal group.
defaults
revert all channels, mixers and this class's cvs to their defaults.
gui(position)
create a RedMixerGUI.
position - Point
inputChannels
return an array with current inputChannels
inputChannels_(arr)
set the input channels.
arr - an array of input channels.
outputChannels
return an array with current outputChannels
outputChannels_(arr)
set the output channels.
arr - an array of output channels.
mute(channel)
channel - index or array of indices to mute.
solo(channel)
channel - index to solo.
def(inputChannels)
should probably be private
instance variables:
<group
the group in use.
<cvs
dictionary of CVs:
lag - lag time in seconds (linear)
<channels
an array of RedMixerChannel objects matching *new's inputChannels argument.
<mixers
an array of RedMixerChannel objects matching *new's outputChannels argument.
//--
a= RedMixer(#[[10, 11], [14, 15]], #[[0, 1]]);
a.channels
a.mixers
a.cvs
b= Pbind(\out, 0, \pan, Pseq([-1, 1], inf)).play
a.mixer.cvs
a.mixer.cvs.bal.value= -0.9
a.cvs.lag.value= 2
a.mixer.cvs.bal.value= 0.9
a.mixer.cvs.vol.value= -6 //db
b.stop
a.free
//--
//b= {var x= SinOsc.kr(1); Pan2.ar(SinOsc.ar(x*40+400, 0, 0.5), x)}.play
a= RedMixer();
b= Pbind(\out, Pseq([0, 2, 4, 6, 8, 10], inf), \degree, Pkey(\out).trace).play;
a.channels[1].cvs.vol.input= 0.6
s.queryAllNodes
a.mixer.cvs.vol.input= 0.7
a.channels[1].cvs.vol.input= 0.95
a.channels[0].cvs.bal.value= 1
a.channels[0].cvs.bal.value= -1
b.stop
a.free
//--
s.boot;
a= RedMixer(group: Group.new); //must boot server before creating and passing in group
s.queryAllNodes
b= Pbind(\out, 8, \pan, Pseq([-1, 1], inf)).play
a.mixers[0].cvs.eqMi.value= 1
a.mixers[0].cvs.eqMi.value= 0
a.channels[3].cvs.eqMi.value= 1
a.channels[3].cvs.eqMi.value= 0
a.free
b.stop
//--
a= RedMixer(#[[2, 3], [4, 5], [6, 7], [8, 9]], [[0, 1], [12, 13]]);
b= Pbind(\out, Pseq([0, 2, 4, 6, 8, 10], inf), \degree, Pkey(\out)).play;
a.channels[1].cvs.vol.input= 0.6
a.inputChannels= [[2, 3], [4, 5], [10, 11], [8, 9]]
a.inputChannels= [[2, 3], [4, 5], [6, 7], [10, 11]]
a.inputChannels
a.outputChannels= [[1, 2], [14, 15]]
a.outputChannels= [[0, 1], [6, 7]]
a.outputChannels
a.defaults
a.free
b.stop
//--
a= RedMixer(#[[2, 3], [4, 5], [6, 7], [8, 9]], [[0, 1], [12, 13]]);
b= Pbind(\out, Pseq([2, 4, 6, 8], inf), \degree, Pkey(\out)).play;
a.solo(0)
a.solo(1)
a.solo(false)
a.mute(0)
a.mute(1)
a.mute(false)
a.mute(true)
a.solo(3)
a.free
b.stop