MCPcopy Create free account
hub / github.com/FastLED/FastLED / getBandEnergy

Method getBandEnergy

src/fl/audio/audio_context.cpp.hpp:94–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94BandEnergy Context::getBandEnergy() {
95 auto fft = getFFT(3, 20.0f, 11025.0f);
96 BandEnergy out;
97 span<const float> lin = fft->linear();
98 if (lin.size() >= 3) {
99 out.bass = lin[0];
100 out.mid = lin[1];
101 out.treb = lin[2];
102 }
103 return out;
104}
105
106shared_ptr<const fft::Bins> Context::getFFT16(fft::Mode mode, fft::Window window) {
107 return getFFT(16, fft::Args::DefaultMinFrequency(),

Callers 1

updateMethod · 0.80

Calls 2

linearMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected