summaryrefslogtreecommitdiff
path: root/mozzi-hello/src/sketch.ino
blob: 64391a8d4fd609216f61cca21d3b1c093bd38fe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 
}