aboutsummaryrefslogtreecommitdiff
path: root/audio/faust/files/example-simple.dsp
diff options
context:
space:
mode:
Diffstat (limited to 'audio/faust/files/example-simple.dsp')
-rw-r--r--audio/faust/files/example-simple.dsp10
1 files changed, 10 insertions, 0 deletions
diff --git a/audio/faust/files/example-simple.dsp b/audio/faust/files/example-simple.dsp
new file mode 100644
index 000000000000..01bc9c7e4d71
--- /dev/null
+++ b/audio/faust/files/example-simple.dsp
@@ -0,0 +1,10 @@
+// from https://faustdoc.grame.fr/tutorials/basic-osc/
+
+import("stdfaust.lib");
+f = hslider("freq",440,50,2000,0.01);
+g = hslider("gain",1,0,1,0.01);
+t = si.smoo(button("gate"));
+phasor(freq) = (+(freq/ma.SR) ~ ma.frac);
+osc(freq) = sin(phasor(freq)*2*ma.PI);
+organ(freq) = (osc(freq) + osc(freq*2) + osc(freq*3))/3;
+process = organ(f)*g*t;