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

◆ computeVerticalLevels()

void computeVerticalLevels ( )

Definition at line 135 of file PJRCSpectrumAnalyzer.h.

135 {
136 unsigned int y;
137 float n, logLevel, linearLevel;
138
139 for (y=0; y < matrix_height; y++) {
140 n = (float)y / (float)(matrix_height - 1);
141 logLevel = pow10f(n * -1.0 * (dynamicRange / 20.0));
142 linearLevel = 1.0 - n;
143 linearLevel = linearLevel * linearBlend;
144 logLevel = logLevel * (1.0 - linearBlend);
145 thresholdVertical[y] = (logLevel + linearLevel) * maxLevel;
146 }
147}
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: