3 declare author "Grame";
5 declare copyright "(c)GRAME 2006";
7 //-------------------------------------------------
9 //-------------------------------------------------
12 smooth(c) = *(1-c) : +~*(c);
15 vol = *(vslider("fader", 0, -60, 4, 0.1) : db2linear : smooth(0.99));
18 mute = *(1 - checkbox("mute"));
21 vumeter(x) = attach(x, envelop(x) : vbargraph("", 0, 1))
22 with { envelop = abs : min(0.99) : max ~ -(1.0/SR); };
24 pan = _ <: *(sqrt(1-c)), *(sqrt(c))
25 with { c = (nentry("pan",0,-8,8,1)-8)/-16 : smooth(0.99); };
27 voice(v) = vgroup("voice %v", mute : hgroup("", vol : vumeter) : pan);
30 stereo = hgroup("stereo out", vol, vol);
33 process = hgroup("mixer", par(i, 8, voice(i)) :> stereo);