-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVUring.ino
28 lines (28 loc) · 1015 Bytes
/
VUring.ino
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
template<int tmpnote> void VUring() {
int tmpval = audioval[0];
bool usePal = 1;
CRGBPalette16 myPal = CloudColors_p;
switch (PotPal) {
case 1: usePal = 0; break;
case 2: myPal = VU_gp; break;
case 3: myPal = RainbowColors_p; break;
case 4: myPal = OceanColors_p; break;
case 5: myPal = CloudColors_p; break;
case 6: myPal = LavaColors_p; break;
case 7: myPal = ForestColors_p; break;
case 8: myPal = PartyColors_p; break;
}
// yield();
for (int i = 0; i < NUM_LEDS; i++) {
for (int j = 0; j < NUM_STRIPS; j=j+2) {
if (usePal == 0) {
leds[j][i].setHSV(gHue, tmpval, tmpval);
leds[j+1][i].setHSV(gHue, tmpval, tmpval);
} else {
leds[j][i] = ColorFromPalette(myPal, ((255/(NUM_LEDS))*i) - (tmpval*2/map(OffsetLed,0,127,1,20)),tmpval);
leds[j+1][abs(i-40)] = ColorFromPalette(myPal, ((255/(NUM_LEDS))*i) - (tmpval*2/map(OffsetLed,0,127,1,20)),tmpval);
}
}
}
MIDInoteF[tmpnote] = 0;
}