jdxi_editor.audio.analysers.spectrum_analyser
A 31-band spectrum from one real FFT.
This measures the signal. It does not filter it.
Attributes
Classes
Hann-windowed FFT, gathered into logarithmic bands, then smoothed. |
Functions
|
The frequency each side of every centre, on a log scale. |
|
Which band contains |
Module Contents
- jdxi_editor.audio.analysers.spectrum_analyser.band_edges() numpy.ndarray[source]
The frequency each side of every centre, on a log scale.
- Returns:
np.ndarray length
BAND_COUNT + 1
- jdxi_editor.audio.analysers.spectrum_analyser.band_for_frequency(frequency: float) int[source]
Which band contains
frequency.- Parameters:
frequency – float Hz
- Returns:
int index into
BAND_CENTERS
- class jdxi_editor.audio.analysers.spectrum_analyser.SpectrumAnalyser(sample_rate: int)[source]
Hann-windowed FFT, gathered into logarithmic bands, then smoothed.
- magnitude_bands(mono: numpy.ndarray) numpy.ndarray[source]
Unsmoothed band levels, in dB, for one mono block.
- Parameters:
mono – np.ndarray samples. Shorter than the FFT is padded.
- Returns:
np.ndarray shape
(BAND_COUNT,)
- update(mono: numpy.ndarray) numpy.ndarray[source]
Smooth the bands and return a clipped copy.
- Parameters:
mono – np.ndarray samples
- Returns:
np.ndarray shape
(BAND_COUNT,), dB