X-Git-Url: https://scm.cri.ensmp.fr/git/Faustine.git/blobdiff_plain/c7f552fd8888da2f0d8cfb228fe0f28d3df3a12c..b4b6f2ea75b9f0f3ca918f5b84016610bf7a4d4f:/interpretor/preprocessor/faust-0.9.47mr3/tools/faust2pd/examples/seqdemo/organ.dsp diff --git a/interpretor/preprocessor/faust-0.9.47mr3/tools/faust2pd/examples/seqdemo/organ.dsp b/interpretor/preprocessor/faust-0.9.47mr3/tools/faust2pd/examples/seqdemo/organ.dsp new file mode 100644 index 0000000..cfe43c6 --- /dev/null +++ b/interpretor/preprocessor/faust-0.9.47mr3/tools/faust2pd/examples/seqdemo/organ.dsp @@ -0,0 +1,24 @@ + +declare name "organ -- a simple additive synth"; +declare author "Albert Graef"; +declare version "1.0"; + +import("music.lib"); + +// control variables + +vol = hslider("vol", 0.3, 0, 10, 0.01); // % +pan = hslider("pan", 0.5, 0, 1, 0.01); // % +attack = hslider("attack", 0.01, 0, 1, 0.001); // sec +decay = hslider("decay", 0.3, 0, 1, 0.001); // sec +sustain = hslider("sustain", 0.5, 0, 1, 0.01); // % +release = hslider("release", 0.2, 0, 1, 0.001); // sec +freq = nentry("freq", 440, 20, 20000, 1); // Hz +gain = nentry("gain", 0.3, 0, 10, 0.01); // % +gate = button("gate"); // 0/1 + +// additive synth: 3 sine oscillators with adsr envelop + +process = (osc(freq)+0.5*osc(2*freq)+0.25*osc(3*freq)) + * (gate : vgroup("1-adsr", adsr(attack, decay, sustain, release))) + * gain : vgroup("2-master", *(vol) : panner(pan));