Receives audio data, runs FFT analysis and stores the result.
More...
#include <SaProcessor.h>
|
| QRgb | makePixel (float left, float right) const |
Receives audio data, runs FFT analysis and stores the result.
◆ SaProcessor()
| lmms::SaProcessor::SaProcessor |
( |
const SaControls * | controls | ) |
|
|
explicit |
◆ ~SaProcessor()
| lmms::SaProcessor::~SaProcessor |
( |
| ) |
|
|
virtual |
◆ ampToYPixel()
| float lmms::SaProcessor::ampToYPixel |
( |
float | amplitude, |
|
|
unsigned int | height ) const |
◆ analyze()
◆ binBandwidth()
| float lmms::SaProcessor::binBandwidth |
( |
| ) |
const |
◆ binCount()
| unsigned int lmms::SaProcessor::binCount |
( |
| ) |
const |
size of output (frequency domain) data block
◆ binToFreq()
| float lmms::SaProcessor::binToFreq |
( |
unsigned int | bin_index | ) |
const |
◆ clear()
| void lmms::SaProcessor::clear |
( |
| ) |
|
◆ clearHistory()
| void lmms::SaProcessor::clearHistory |
( |
| ) |
|
◆ flipRequest()
| void lmms::SaProcessor::flipRequest |
( |
| ) |
|
|
inline |
◆ freqToXPixel()
| float lmms::SaProcessor::freqToXPixel |
( |
float | frequency, |
|
|
unsigned int | width ) const |
◆ getAmpRangeMax()
| float lmms::SaProcessor::getAmpRangeMax |
( |
| ) |
const |
◆ getAmpRangeMin()
| float lmms::SaProcessor::getAmpRangeMin |
( |
bool | linear = false | ) |
const |
◆ getFreqRangeMax()
| float lmms::SaProcessor::getFreqRangeMax |
( |
| ) |
const |
◆ getFreqRangeMin()
| float lmms::SaProcessor::getFreqRangeMin |
( |
bool | linear = false | ) |
const |
◆ getHistory()
| const uchar * lmms::SaProcessor::getHistory |
( |
| ) |
const |
|
inline |
◆ getNyquistFreq()
| float lmms::SaProcessor::getNyquistFreq |
( |
| ) |
const |
◆ getSampleRate()
| unsigned int lmms::SaProcessor::getSampleRate |
( |
| ) |
const |
◆ getSpectrumL()
| const float * lmms::SaProcessor::getSpectrumL |
( |
| ) |
const |
|
inline |
◆ getSpectrumR()
| const float * lmms::SaProcessor::getSpectrumR |
( |
| ) |
const |
|
inline |
◆ inBlockSize()
| unsigned int lmms::SaProcessor::inBlockSize |
( |
| ) |
const |
|
inline |
◆ makePixel()
| QRgb lmms::SaProcessor::makePixel |
( |
float | left, |
|
|
float | right ) const |
|
private |
◆ reallocateBuffers()
| void lmms::SaProcessor::reallocateBuffers |
( |
| ) |
|
◆ rebuildWindow()
| void lmms::SaProcessor::rebuildWindow |
( |
| ) |
|
◆ setSpectrumActive()
| void lmms::SaProcessor::setSpectrumActive |
( |
bool | active | ) |
|
◆ setWaterfallActive()
| void lmms::SaProcessor::setWaterfallActive |
( |
bool | active | ) |
|
◆ spectrumNotEmpty()
| bool lmms::SaProcessor::spectrumNotEmpty |
( |
| ) |
|
check if result buffers contain any non-zero values
◆ terminate()
| void lmms::SaProcessor::terminate |
( |
| ) |
|
|
inline |
◆ waterfallHeight()
| unsigned int lmms::SaProcessor::waterfallHeight |
( |
| ) |
const |
|
inline |
◆ waterfallNotEmpty()
| bool lmms::SaProcessor::waterfallNotEmpty |
( |
| ) |
const |
|
inline |
◆ waterfallWidth()
| unsigned int lmms::SaProcessor::waterfallWidth |
( |
| ) |
const |
binCount value capped at 3840 (for display)
◆ xPixelToFreq()
| float lmms::SaProcessor::xPixelToFreq |
( |
float | x, |
|
|
unsigned int | width ) const |
◆ yPixelToAmp()
| float lmms::SaProcessor::yPixelToAmp |
( |
float | y, |
|
|
unsigned int | height ) const |
◆ m_absSpectrumL
| std::vector<float> lmms::SaProcessor::m_absSpectrumL |
|
private |
frequency domain samples (absolute) (left)
◆ m_absSpectrumR
| std::vector<float> lmms::SaProcessor::m_absSpectrumR |
|
private |
frequency domain samples (absolute) (right)
◆ m_bufferL
| std::vector<float> lmms::SaProcessor::m_bufferL |
|
private |
time domain samples (left)
◆ m_bufferR
| std::vector<float> lmms::SaProcessor::m_bufferR |
|
private |
time domain samples (right)
◆ m_controls
◆ m_dataAccess
| QMutex lmms::SaProcessor::m_dataAccess |
◆ m_fftBlockSize
| unsigned int lmms::SaProcessor::m_fftBlockSize |
|
private |
size of padded block for FFT processing
◆ m_fftPlanL
| fftwf_plan lmms::SaProcessor::m_fftPlanL |
|
private |
◆ m_fftPlanR
| fftwf_plan lmms::SaProcessor::m_fftPlanR |
|
private |
◆ m_fftWindow
| std::vector<float> lmms::SaProcessor::m_fftWindow |
|
private |
precomputed window function coefficients
◆ m_filteredBufferL
| std::vector<float> lmms::SaProcessor::m_filteredBufferL |
|
private |
time domain samples with window function applied (left)
◆ m_filteredBufferR
| std::vector<float> lmms::SaProcessor::m_filteredBufferR |
|
private |
time domain samples with window function applied (right)
◆ m_flipRequest
| bool lmms::SaProcessor::m_flipRequest |
|
private |
update public buffer only when requested
◆ m_framesFilledUp
| unsigned int lmms::SaProcessor::m_framesFilledUp |
|
private |
◆ m_history
| std::vector<uchar> lmms::SaProcessor::m_history |
|
private |
public buffer for reading
◆ m_history_work
| std::vector<uchar> lmms::SaProcessor::m_history_work |
|
private |
local history buffer for render
◆ m_inBlockSize
| std::atomic<unsigned int> lmms::SaProcessor::m_inBlockSize |
|
private |
size of input (time domain) data block
◆ m_normSpectrumL
| std::vector<float> lmms::SaProcessor::m_normSpectrumL |
|
private |
frequency domain samples (normalized) (left)
◆ m_normSpectrumR
| std::vector<float> lmms::SaProcessor::m_normSpectrumR |
|
private |
frequency domain samples (normalized) (right)
◆ m_reallocating
| bool lmms::SaProcessor::m_reallocating |
|
private |
◆ m_reallocationAccess
| QMutex lmms::SaProcessor::m_reallocationAccess |
◆ m_sampleRate
| unsigned int lmms::SaProcessor::m_sampleRate |
|
private |
◆ m_spectrumActive
| bool lmms::SaProcessor::m_spectrumActive |
|
private |
◆ m_spectrumL
| fftwf_complex* lmms::SaProcessor::m_spectrumL |
|
private |
frequency domain samples (complex) (left)
◆ m_spectrumR
| fftwf_complex* lmms::SaProcessor::m_spectrumR |
|
private |
frequency domain samples (complex) (right)
◆ m_terminate
| bool lmms::SaProcessor::m_terminate |
|
private |
◆ m_waterfallActive
| bool lmms::SaProcessor::m_waterfallActive |
|
private |
◆ m_waterfallHeight
| std::atomic<unsigned int> lmms::SaProcessor::m_waterfallHeight |
|
private |
number of stored lines in history buffer
◆ m_waterfallMaxWidth
| const unsigned int lmms::SaProcessor::m_waterfallMaxWidth = 3840 |
|
private |
◆ m_waterfallNotEmpty
| std::atomic<unsigned int> lmms::SaProcessor::m_waterfallNotEmpty |
|
private |
number of lines remaining visible on display
◆ m_zeroPadFactor
| unsigned int lmms::SaProcessor::m_zeroPadFactor = 2 |
|
private |
use n-steps bigger FFT for given block size
The documentation for this class was generated from the following files: