Examples' Makefiles are completed and tested.
[Faustine.git] / interpretor / preprocessor / faust-0.9.47mr3 / tools / faust2pd / examples / basic / pink.dsp
1
2 declare name "pink -- pink noise";
3 declare author "Albert Graef";
4 declare version "1.0";
5
6 import("music.lib");
7
8 // control variables
9
10 vol = nentry("vol", 0.3, 0, 10, 0.01); // %
11 pan = nentry("pan", 0.5, 0, 1, 0.01); // %
12
13 // pink noise filter (-3dB per octave), see musicdsp.org
14
15 pink = f : (+ ~ g) with {
16 f(x) = 0.04957526213389*x - 0.06305581334498*x' +
17 0.01483220320740*x'';
18 g(x) = 1.80116083982126*x - 0.80257737639225*x';
19 };
20
21 // pink noise generator
22
23 process = (noise:pink)*vol : panner(pan);