Add new Audio Responsive Ramp palette

This commit is contained in:
Will Tatam
2023-01-20 20:16:22 +00:00
parent f1fe6296e7
commit 89040a3a24
4 changed files with 12 additions and 4 deletions

View File

@@ -535,5 +535,11 @@ CRGB getCRGBForBand(int x, uint8_t *fftResult, int pal) {
hsv = CHSV(fftResult[b], 255, map(fftResult[b], 0, 255, 30, 255)); // pick hue
hsv2rgb_rainbow(hsv, value); // convert to R,G,B
}
else if(pal == 73) {
int b = map(x, 0, 255, 0, 8); // convert palette position to lower half of freq band
hsv = CHSV(uint8_t(fftResult[b]), 255, x);
hsv2rgb_rainbow(hsv, value); // convert to R,G,B
}
return value;
}
}