diff options
Diffstat (limited to 'mozzi-hello/src/sketch.ino')
| -rw-r--r-- | mozzi-hello/src/sketch.ino | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mozzi-hello/src/sketch.ino b/mozzi-hello/src/sketch.ino new file mode 100644 index 0000000..64391a8 --- /dev/null +++ b/mozzi-hello/src/sketch.ino @@ -0,0 +1,23 @@ +#include <MozziGuts.h> // at the top of your sketch +#define CONTROL_RATE 64 // or some other power of 2 + +void setup() { + startMozzi(CONTROL_RATE); + randomSeed(analogRead(0)); +} + +void loop() { + audioHook(); // fills the audio buffer +} + +int updateAudio() { + // your audio code which returns an int + // between -244 and 243 in STANDARD mode + // or between -8192 and 8191 in HIFI mode + return randNumber = random(-244, 243); +} + +void updateControl() { + // your control code +} + |
