a69e05bd3e448c9dac37d94042ca6237ceeeb94a
[Faustine.git] / interpretor / faust-0.9.47mr3 / tools / faust2pd / examples / faust / tapiir.dsp
1 declare name "tapiir";
2 declare version "1.0";
3 declare author "Grame";
4 declare license "BSD";
5 declare copyright "(c)GRAME 2006";
6
7 //======================================================
8 //
9 // TAPIIR
10 // (from Maarten de Boer's Tapiir)
11 //
12 //======================================================
13
14 import("music.lib");
15
16
17 dsize = 524288;
18
19
20
21 // user interface
22 //---------------
23
24
25 tap(n) = vslider("tap %n", 0,0,1,0.1);
26 in(n) = vslider("input %n", 1,0,1,0.1);
27 gain = vslider("gain", 1,0,1,0.1);
28 del = vslider("delay (sec)", 0, 0, 5, 0.01) * SR;
29
30
31 // mixer and matrix
32 //-----------------------------------------------------------
33
34 mixer(taps,lines) = par(i,taps,*(tap(i))),
35 par(i,lines,*(in(i)))
36 :> *(gain);
37
38
39 matrix(taps,lines) = ( bus(lines+taps)
40 <: tgroup("",
41 par(i, taps,
42 hgroup("Tap %i",
43 mixer(taps,lines) : delay(dsize,del))))
44 ) ~ bus(taps);
45
46
47 // tapiir
48 //--------
49
50 tapiir(taps,lines) = vgroup("Tapiir",
51 bus(lines)
52 <: (matrix(taps,lines), bus(lines))
53 <: vgroup( "outputs", par( i, lines, hgroup("output %i", mixer(taps,lines)) ) )
54 );
55
56
57
58 process = tapiir(6,2);
59
60