Merge branch 'OOP' of https://scm.cri.ensmp.fr/git/Faustine into OOP
[Faustine.git] / interpretor / faust-0.9.47mr3 / examples / osci.dsp
1 declare name "osci";
2 declare version "1.0";
3 declare author "Grame";
4 declare license "BSD";
5 declare copyright "(c)GRAME 2009";
6
7 //-----------------------------------------------
8 // Sinusoidal Oscillator
9 // (with linear interpolation)
10 //-----------------------------------------------
11
12 import("music.lib");
13
14 smooth(c) = *(1-c) : +~*(c);
15 vol = hslider("volume [unit:dB]", 0, -96, 0, 0.1) : db2linear : smooth(0.999) ;
16 freq = hslider("freq [unit:Hz]", 1000, 20, 24000, 1);
17
18
19 process = vgroup("Oscillator", osci(freq) * vol);