diff options
Diffstat (limited to 'maximilian_examples/1.TestTone.cpp')
| -rwxr-xr-x | maximilian_examples/1.TestTone.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/maximilian_examples/1.TestTone.cpp b/maximilian_examples/1.TestTone.cpp index 77783b4..c27941c 100755 --- a/maximilian_examples/1.TestTone.cpp +++ b/maximilian_examples/1.TestTone.cpp @@ -1,14 +1,15 @@ #include "maximilian.h" -maxiOsc mySine;//let's create an oscillator and give it a name. - +//This shows how the fundamental building block of digital audio - the sine wave. +// +maxiOsc mySine;//One oscillator - can be called anything. Can be any of the available waveforms. 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! - -} +void play(double *output) { + output[0]=mySine.sinewave(440); + output[1]=output[0]; + +} |
