Newer
Older
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#include "disco.h"
disco::disco() {
}
//--------------------------------------------------------------
void disco::setup() {
}
//--------------------------------------------------------------
void disco::update(float value, float hihat_value) {
ofBackgroundGradient(0, 15, OF_GRADIENT_CIRCULAR); //gradient background, looks cooler than normal flat
float hiHatValue = hihat_value;
float beatValue = value;
if (beatValue > 16 && prevBeat<15.8) { //these values need adjusting depending on the sound you're outputting via line in/mic
counter++;
}
if (counter == (loops * 5)) {
counter = 0;
}
//VISUAL 1
if (counter <= (loops * 1)) {
std::cout << "test" << endl;
}
//VISUAL 2
else if (counter >= (loops * 1) && counter <= (loops * 2)) {
}
//VISUAL 3
else if (counter >= (loops * 2) && counter <= (loops * 3)) {
}
//VISUAL 4
else if (counter >= (loops * 3) && counter <= (loops * 4)) {
}
//VISUAL 5
else if (counter >= (loops * 4) && counter <= (loops * 5)) {
}
prevBeat = value;
}
//--------------------------------------------------------------
void disco::draw() {
}