From 5b37d13616c303538a61b520e6930b322e4ff378 Mon Sep 17 00:00:00 2001 From: mick grierson Date: Thu, 27 Aug 2015 13:33:41 +0100 Subject: redoing tutorials a bit --- maximilian_examples/1.TestTone.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'maximilian_examples/1.TestTone.cpp') 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! + } -- cgit v1.3