aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
blob: ff2122d920e99fc544a0ea7631951eef4450a0f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "maximilian.h"


maxiOsc timer;//this is the metronome
int currentCount,lastCount,blob;//these values are used to check if we have a new beat this sample

void setup() {//some inits
	//nothing to go here this time	
	
	blob=0;
}

void play(double *output) {
	
	
	currentCount=(int)timer.phasor(1000);//this sets up a metronome that ticks every 2 seconds
	
	if (lastCount!=currentCount) {//if we have a new timer int this sample, play the sound
				
		cout << "tick\n";//the clock ticks
		blob++;
		cout << blob;
		cout << "\n";
		lastCount=0;//set lastCount to 0
	}
		
}