diff options
| author | mick grierson <mickgrierson@gmail.com> | 2015-09-22 09:21:43 +0100 |
|---|---|---|
| committer | mick grierson <mickgrierson@gmail.com> | 2015-09-22 09:21:43 +0100 |
| commit | 5be3472f0f61d2e479f42759fed6fafd2a0e739a (patch) | |
| tree | 49f128d4b56d43b3499ffd824b57b7f8b8d8345a /maximilian_examples/1.TestTone.cpp | |
| parent | c814dd99dc3c347914c2057b77d1390ba41cfae5 (diff) | |
more work for kadenze mooc
Diffstat (limited to 'maximilian_examples/1.TestTone.cpp')
| -rwxr-xr-x | maximilian_examples/1.TestTone.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/maximilian_examples/1.TestTone.cpp b/maximilian_examples/1.TestTone.cpp index b8da07c..c27941c 100755 --- a/maximilian_examples/1.TestTone.cpp +++ b/maximilian_examples/1.TestTone.cpp @@ -1,19 +1,15 @@ -//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. - +//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 } -void play(double *output) {//this is where the magic happens. Very slow magic. - - //output[0] is the left output. output[1] is the right output - output[0]=mySine.sinewave(440);//simple as that! +void play(double *output) { + + output[0]=mySine.sinewave(440); + output[1]=output[0]; } - |
