Add input csv files of examples to track list.
[Faustine.git] / interpreter / preprocessor / faust-0.9.47mr3 / benchmark / mixer.dsp
1 declare name "mixer";
2 declare version "1.0";
3 declare author "Grame";
4 declare license "BSD";
5 declare copyright "(c)GRAME 2006";
6
7 //-------------------------------------------------
8 // Simple 8x2 mixer
9 //-------------------------------------------------
10 import("music.lib");
11
12 smooth(c) = *(1-c) : +~*(c);
13
14
15 vol = *(vslider("fader", 0, -60, 4, 0.1) : db2linear : smooth(0.99));
16
17
18 mute = *(1 - checkbox("mute"));
19
20
21 vumeter(x) = attach(x, envelop(x) : vbargraph("", 0, 1))
22 with { envelop = abs : min(0.99) : max ~ -(1.0/SR); };
23
24 pan = _ <: *(sqrt(1-c)), *(sqrt(c))
25 with { c = (nentry("pan",0,-8,8,1)-8)/-16 : smooth(0.99); };
26
27 voice(v) = vgroup("voice %v", mute : hgroup("", vol : vumeter) : pan);
28
29
30 stereo = hgroup("stereo out", vol, vol);
31
32
33 process = hgroup("mixer", par(i, 8, voice(i)) :> stereo);
34
35