FastLED 3.9.15
Loading...
Searching...
No Matches

◆ computeVerticalLevels()

void computeVerticalLevels ( )

Definition at line 130 of file PJRCSpectrumAnalyzer.h.

130 {
131 unsigned int y;
132 float n, logLevel, linearLevel;
133
134 for (y=0; y < matrix_height; y++) {
135 n = (float)y / (float)(matrix_height - 1);
136 logLevel = pow10f(n * -1.0 * (dynamicRange / 20.0));
137 linearLevel = 1.0 - n;
138 linearLevel = linearLevel * linearBlend;
139 logLevel = logLevel * (1.0 - linearBlend);
140 thresholdVertical[y] = (logLevel + linearLevel) * maxLevel;
141 }
142}
int y
Definition simple.h:93
float thresholdVertical[matrix_height]
const unsigned int matrix_height
const float linearBlend
const float dynamicRange
const float maxLevel

References dynamicRange, linearBlend, matrix_height, maxLevel, thresholdVertical, and y.

Referenced by setup().

+ Here is the caller graph for this function: