aboutsummaryrefslogtreecommitdiffstats
path: root/maximilian_examples/2.TwoTones.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'maximilian_examples/2.TwoTones.cpp')
-rwxr-xr-xmaximilian_examples/2.TwoTones.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/maximilian_examples/2.TwoTones.cpp b/maximilian_examples/2.TwoTones.cpp
new file mode 100755
index 0000000..4e22994
--- /dev/null
+++ b/maximilian_examples/2.TwoTones.cpp
@@ -0,0 +1,14 @@
+#include "maximilian.h"
+
+maxiOsc mySine,myOtherSine;//Two oscillators with names.
+
+void setup() {//some inits
+ //nothing to go here this time
+}
+
+void play(double *output) {//this is where the magic happens. Very slow magic.
+
+ *output=mySine.sinewave(440)+myOtherSine.sinewave(441);//these two sines will beat together. They're now a bit too loud though..
+
+}
+