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