From eabb1855777c8451c8a35bae4309ee112ac4460e Mon Sep 17 00:00:00 2001 From: Chris Kiefer Date: Fri, 11 Oct 2013 11:13:00 +0100 Subject: additive example --- main.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index b835b67..bedbbae 100755 --- a/main.cpp +++ b/main.cpp @@ -1,14 +1,20 @@ #include "maximilian.h" -maxiOsc mySine;//let's create an oscillator and give it a name. +const int NUM = 200; +maxiOsc sineBank[NUM];//let's create an oscillator and give it a name. +maxiOsc modu; void setup() {//some inits //nothing to go here this time } + + + void play(double *output) {//this is where the magic happens. Very slow magic. + double wave = modu.saw(100); + *output = wave;//simple as that! - *output=mySine.sinewave(440);//simple as that! - + } -- cgit v1.3