From 8111ed7c07a31dd99a323a0a29f9e99dd54c6d80 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Wed, 15 May 2013 22:34:48 +0300 Subject: Lots of project tests --- mozzi-hello/src/sketch.ino | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 mozzi-hello/src/sketch.ino (limited to 'mozzi-hello/src/sketch.ino') 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 // 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 +} + -- cgit v1.3.1