aboutsummaryrefslogtreecommitdiffstats
path: root/maximilian_examples/4.AM2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'maximilian_examples/4.AM2.cpp')
-rwxr-xr-xmaximilian_examples/4.AM2.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/maximilian_examples/4.AM2.cpp b/maximilian_examples/4.AM2.cpp
new file mode 100755
index 0000000..4e783d3
--- /dev/null
+++ b/maximilian_examples/4.AM2.cpp
@@ -0,0 +1,16 @@
+#include "maximilian.h"
+
+//This shows how to use maximilian to do basic amplitude modulation
+
+maxiOsc mySine,myOtherSine,myPhasor;//Three oscillators. They can be called anything. They can be any of the available waveforms.
+
+
+void setup() {//some inits
+ //nothing to go here this time
+}
+
+void play(double *output) {
+
+ *output=mySine.sinewave(440)*myOtherSine.sinewave(myPhasor.phasor(0.1,0,440));
+
+}