-
Notifications
You must be signed in to change notification settings - Fork 0
/
master.scd
31 lines (31 loc) · 891 Bytes
/
master.scd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
(
var chain = [
[\master, \route],
[\comp, \compressor],
[\limit, \limiter],
[\eq, \eq],
[\send, \route]
];
~freeMaster = {
if(~master.size.isPositive){
~master[\synth].do(_.release);
~master[\bus].do(_.free);
~master[\in].free;
~master = nil;
};
};
~freeMaster.();
~master = (
\in: Bus.audio(s, ~numSpeakers),
\synth: Dictionary.new(),
\bus: Bus.audio(s, ~numSpeakers) ! chain.size
);
chain.do({|i, idx|
~master[\synth].put(i[0], Synth(i[1], target: ~group[\master], addAction: \addToTail));
if(idx == 0){
~master[\synth][i].set(\in, ~master[\in], \out, ~master[\bus][idx]);
}{
~master[\synth][i].set(\in, ~master[\bus][idx - 1], \out, ~master[\bus][idx]);
};
});
)