Bugs fixed for stdin and stdout.
[Faustine.git] / interpreter / preprocessor / faust-0.9.47mr3 / examples / switcher.dsp
1 declare name "switch";
2 declare version "1.0";
3 declare author "Grame";
4 declare license "BSD";
5 declare copyright "(c)GRAME 2007";
6
7 //-----------------------------------------------
8 // Switch between two stereo sources.
9 // Useful to compare these two sources
10 // The parameter c\in{0,1} indicates the
11 // channels to select
12 //-----------------------------------------------
13
14 switch(c,x0,x1,y0,y1) = sel(c,x0,y0), sel(c,x1,y1)
15 with {
16 sel(c,x,y) = (1-c)*x + c*y;
17 };
18
19 process = switch(hslider("source 0 <-> source 1",0,0,1,1));
20
21
22