Skip to content

Commit 1c66f98

Browse files
author
Will Tatam
committed
MSGEQ7read can be called only once, so legacy patterns use ReadAudio to update left[] and right[]
1 parent f1a11d1 commit 1c66f98

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

Deevstock/DSGrid/FunkyClouds.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,12 @@ extern const TProgmemPalette16 myRedWhiteBluePalette_p PROGMEM;
100100
*/
101101

102102
void ReadAudio() {
103-
// handled in controlLoop
103+
if(MSGEQ7read()) {
104+
for (int b = 0; b < 7; b++) {
105+
left[b] = map(MSGEQ7.get(b, 0), 0, MSGEQ7_OUT_MAX, 0, 1023);
106+
right[b] = map(MSGEQ7.get(b, 1), 0, MSGEQ7_OUT_MAX, 0, 1023);
107+
}
108+
}
104109
}
105110

106111
/*

Deevstock/DSGrid/control_tdmx.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,4 @@ void controlLoop() {
7373
FADE = getValue(4, 0, 255); // fade = 4
7474

7575
}
76-
if(MSGEQ7read()) {
77-
for (int b = 0; b < 7; b++) {
78-
left[b] = map(MSGEQ7.get(b, 0), 0, MSGEQ7_OUT_MAX, 0, 1023);
79-
right[b] = map(MSGEQ7.get(b, 1), 0, MSGEQ7_OUT_MAX, 0, 1023);
80-
}
81-
}
8276
}

0 commit comments

Comments
 (0)