summaryrefslogtreecommitdiff
path: root/mozzi-hello
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2013-05-15 22:34:48 +0300
committerYuval Adam <yuv.adm@gmail.com>2013-05-15 22:34:48 +0300
commit8111ed7c07a31dd99a323a0a29f9e99dd54c6d80 (patch)
tree9e8714c16ac55f56c90cca63380ee083d876cfb1 /mozzi-hello
parentf9271756add719a30144ba60753cbae1e11ecd5f (diff)
Lots of project tests
Diffstat (limited to 'mozzi-hello')
-rw-r--r--mozzi-hello/lib/.holder0
l---------mozzi-hello/src/mozzi1
-rw-r--r--mozzi-hello/src/sketch.ino23
3 files changed, 24 insertions, 0 deletions
diff --git a/mozzi-hello/lib/.holder b/mozzi-hello/lib/.holder
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/mozzi-hello/lib/.holder
diff --git a/mozzi-hello/src/mozzi b/mozzi-hello/src/mozzi
new file mode 120000
index 0000000..5e2d2c2
--- /dev/null
+++ b/mozzi-hello/src/mozzi
@@ -0,0 +1 @@
+/Users/yuval/dev/mozzi \ No newline at end of file
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
+}
+