aboutsummaryrefslogtreecommitdiffstats
path: root/maximilian_examples/1.TestTone.cpp
diff options
context:
space:
mode:
authormick grierson <mickgrierson@gmail.com>2015-08-27 13:33:41 +0100
committermick grierson <mickgrierson@gmail.com>2015-08-27 13:33:41 +0100
commit5b37d13616c303538a61b520e6930b322e4ff378 (patch)
treea616325e9bdd71ba22fd22ad419963035322e8a0 /maximilian_examples/1.TestTone.cpp
parentb155008277cbdba3534ca392d67e2db199d9c458 (diff)
redoing tutorials a bit
Diffstat (limited to 'maximilian_examples/1.TestTone.cpp')
-rwxr-xr-xmaximilian_examples/1.TestTone.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/maximilian_examples/1.TestTone.cpp b/maximilian_examples/1.TestTone.cpp
index 77783b4..b8da07c 100755
--- a/maximilian_examples/1.TestTone.cpp
+++ b/maximilian_examples/1.TestTone.cpp
@@ -1,14 +1,19 @@
+//This example shows how to create one of the most fundamental building blocks in computer audio. The sine wave.
+//The sine wave is an oscillator - it oscillates back and forth between two values in a particular shape.
+
+
#include "maximilian.h"
maxiOsc mySine;//let's create an oscillator and give it a name.
void setup() {//some inits
- //nothing to go here this time
+ //nothing to go here this time
}
void play(double *output) {//this is where the magic happens. Very slow magic.
-
- *output=mySine.sinewave(440);//simple as that!
-
+
+ //output[0] is the left output. output[1] is the right output
+ output[0]=mySine.sinewave(440);//simple as that!
+
}