Fix audio responsive hue
This commit is contained in:
@@ -1247,13 +1247,13 @@ uint8_t * Segment::getAudioPalette(int pal) {
|
||||
xyz[6] = rgb.g;
|
||||
xyz[7] = rgb.b;
|
||||
|
||||
rgb = getCRGBForBand(4, fftResult, pal);
|
||||
rgb = getCRGBForBand(128, fftResult, pal);
|
||||
xyz[8] = 128;
|
||||
xyz[9] = rgb.r;
|
||||
xyz[10] = rgb.g;
|
||||
xyz[11] = rgb.b;
|
||||
|
||||
rgb = getCRGBForBand(8, fftResult, pal);
|
||||
rgb = getCRGBForBand(255, fftResult, pal);
|
||||
xyz[12] = 255; // anchor of last color - must be 255
|
||||
xyz[13] = rgb.r;
|
||||
xyz[14] = rgb.g;
|
||||
|
||||
@@ -531,7 +531,7 @@ CRGB getCRGBForBand(int x, uint8_t *fftResult, int pal) {
|
||||
}
|
||||
}
|
||||
else if(pal == 72) {
|
||||
int b = map(x, 0, 255, 0, 8); // convert palette position to lower half of freq band
|
||||
int b = map(x, 1, 255, 0, 10); // convert palette position to lower half of freq band
|
||||
hsv = CHSV(fftResult[b], 255, map(fftResult[b], 0, 255, 30, 255)); // pick hue
|
||||
hsv2rgb_rainbow(hsv, value); // convert to R,G,B
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user