Add audio responsive pallette by Netmindz

const.h: increase GRADIENT_PALETTE_COUNT
fcn_declare: add getCRGBForBand
FX.h: add getAudioPalette
FX_fcn.cpp: call and getAudioPalette, add Audio Responsive palette
palettes.h: add audio_responsive_gp
util.cpp: add getCRGBForBand
This commit is contained in:
Ewoud
2022-11-18 12:09:47 +01:00
parent 017f0267a2
commit 181f8c546b
9 changed files with 69 additions and 7 deletions

View File

@@ -513,4 +513,20 @@ void enumerateLedmaps() {
bool isFile = WLED_FS.exists(fileName);
if (isFile) ledMaps |= 1 << i;
}
}
//WLEDMM netmindz ar palette
CRGB getCRGBForBand(int x, uint8_t *fftResult) {
CRGB value;
CHSV hsv;
if(x == 0) {
value = CRGB(fftResult[10]/2, fftResult[4]/2, fftResult[0]/2);
}
else if(x == 255) {
value = CRGB(fftResult[10]/2, fftResult[0]/2, fftResult[4]/2);
}
else {
value = CRGB(fftResult[0]/2, fftResult[4]/2, fftResult[10]/2);
}
return value;
}