|
arduino-audio-tools
|
Graphic Equalizer implemented as an FFT effect: boosts or cuts logarithmically spaced frequency bands (20Hz .. Nyquist) by scaling the magnitude of the bins that fall into each band while leaving their phase untouched. Since this operates directly on the frequency-domain bins rather than an FIR/IIR approximation, band edges are exact and there is no filter ripple. More...
#include <FFTEffects.h>
Public Member Functions | |
| FFTEqualizer (AudioOutput &out) | |
| FFTEqualizer (AudioOutput &out, AudioFFTBase &fft) | |
| FFTEqualizer (AudioStream &out) | |
| FFTEqualizer (AudioStream &out, AudioFFTBase &fft) | |
| FFTEqualizer (Print &out) | |
| FFTEqualizer (Print &out, AudioFFTBase &fft) | |
| virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
| Adds target to be notified about audio changes. | |
| virtual AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| virtual int | availableForWrite () override |
| bool | begin () override |
| virtual bool | begin (AudioInfo info) |
| bool | begin (FFTEffectConfig info) |
| bool | begin (FFTEqualizerConfig cfg) |
| virtual void | clearNotifyAudioChange () |
| Deletes all change notify subscriptions. | |
| FFTEqualizerConfig | defaultConfig () |
| virtual void | end () |
| virtual void | flush () |
| int | getBandCount () |
| Number of active bands. | |
| float | getBandDB (int band) |
| Gets the currently defined gain for a band in dB. | |
| float | getBandFrequency (int band) |
| Gets the center frequency of a band in Hz (only valid after begin()) | |
| virtual bool | isDeletable () |
| If true we need to release the related memory in the destructor. | |
| bool | isNotifyActive () |
| Checks if the automatic AudioInfo update is active. | |
| virtual | operator bool () |
| virtual bool | removeNotifyAudioChange (AudioInfoSupport &bi) |
| Removes a target in order not to be notified about audio changes. | |
| virtual void | setAudioInfo (AudioInfo newInfo) override |
| Defines the input AudioInfo. | |
| void | setBandCount (int bands) |
| bool | setBandDB (int band, float gain_db) |
| bool | setBandGain (int band, float volume) |
| bool | setBandGains (float volume) |
| Sets the same gain for all bands. | |
| void | setNotifyActive (bool flag) |
| Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
| size_t | write (const uint8_t *data, size_t len) override |
| virtual size_t | write (uint8_t ch) override |
| virtual void | writeSilence (size_t len) |
Protected Member Functions | |
| void | effect (AudioFFTBase &fft) override |
| void | notifyAudioChange (AudioInfo info) |
| void | processOutput () |
| void | setupBands () |
Static Protected Member Functions | |
| static void | effect_callback (AudioFFTBase &fft) |
Protected Attributes | |
| int | _timeout = 10 |
| Vector< int > | band_bin_from |
| Vector< int > | band_bin_to |
| Vector< float > | band_center_freq |
| int | band_count = 10 |
| BufferedWindow | buffered {&hann} |
| AudioInfo | cfg |
| StreamCopy | copier |
| AudioRealFFT | default_fft |
| AudioFFTConfig | fft_cfg {default_fft.defaultConfig(RXTX_MODE)} |
| Vector< float > | gains_db |
| Vector< float > | gains_linear |
| Hann | hann |
| bool | is_active = false |
| bool | is_notify_active = true |
| Vector< AudioInfoSupport * > | notify_vector |
| AudioFFTBase * | p_fft = nullptr |
| Print * | p_out = nullptr |
| SingleBuffer< uint8_t > | tmp {MAX_SINGLE_CHARS} |
| int | tmpPos = 0 |
Graphic Equalizer implemented as an FFT effect: boosts or cuts logarithmically spaced frequency bands (20Hz .. Nyquist) by scaling the magnitude of the bins that fall into each band while leaving their phase untouched. Since this operates directly on the frequency-domain bins rather than an FIR/IIR approximation, band edges are exact and there is no filter ripple.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtualinherited |
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, EncodedAudioOutput, EncodedAudioStream, AACDecoderFDK, DecoderBasic, CodecChain, MP3DecoderHelix, MP3DecoderMAD, OggContainerDecoder, RTSPClient< TcpClient, UdpSocket >, Pipeline, and Pipeline::ModifyingStreamAdapter.
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in AdapterPrintToAudioOutput, EncodedAudioOutput, and AdapterAudioStreamToAudioOutput.
|
inlinevirtualinherited |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in MP3EncoderShine, PureDataStream, PWMAudioOutput< PWMDriverT >, ChannelFormatConverterStreamT< T >, ChannelFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, NumberFormatConverterStream, FormatConverterStream, Pipeline, ResampleStream, and ResampleStreamT< TInterpolator >.
|
inlineoverridevirtualinherited |
Reimplemented from Print.
Reimplemented in AudioESP32ULP, RTSPOutput< Platform >, SPIAudioMaster, EncodedAudioOutput, AudioServerEx, AudioSyncWriter, AdapterAudioStreamToAudioOutput, CsvOutput< T >, MemoryOutput, and PWMAudioOutput< PWMDriverT >.
|
inlineoverridevirtual |
Reimplemented from FFTEffect.
|
inlinevirtualinherited |
Reimplemented in AudioESP32ULP, RTSPOutput< Platform >, RTTTLOutput< T >, ChannelsSelectOutput, CsvOutput< T >, and EncodedAudioOutput.
|
inlineinherited |
|
inline |
|
inlinevirtualinherited |
Deletes all change notify subscriptions.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
|
inline |
|
inlineoverrideprotectedvirtual |
Scales the magnitude of the bins in each band by the configured gain, leaving the phase untouched
Implements FFTEffect.
|
inlinestaticprotectedinherited |
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Reimplemented from Print.
Reimplemented in MultiOutput, and HexDumpOutput.
|
inline |
Number of active bands.
|
inline |
Gets the currently defined gain for a band in dB.
|
inline |
Gets the center frequency of a band in Hz (only valid after begin())
|
inlinevirtualinherited |
If true we need to release the related memory in the destructor.
Reimplemented in AdapterPrintToAudioOutput, and AdapterAudioStreamToAudioOutput.
|
inlineinherited |
Checks if the automatic AudioInfo update is active.
|
inlineprotectedinherited |
|
inlinevirtualinherited |
Reimplemented in RTSPOutput< Platform >, EncodedAudioOutput, and AdapterAudioStreamToAudioOutput.
|
inlineprotectedinherited |
|
inlinevirtualinherited |
Removes a target in order not to be notified about audio changes.
Reimplemented in RTSPClient< TcpClient, UdpSocket >.
|
inlineoverridevirtualinherited |
Defines the input AudioInfo.
Implements AudioInfoSupport.
Reimplemented in ChannelsSelectOutput, AdapterPrintToAudioOutput, MultiOutput, SPIAudioMaster, AdapterAudioStreamToAudioOutput, CsvOutput< T >, PWMAudioOutput< PWMDriverT >, and EncodedAudioOutput.
|
inline |
Defines the number of logarithmically spaced bands; call before begin() or before defaultConfig() if you want a non-default band count.
|
inline |
Sets the gain for a band directly in dB (-90 to +12 is a sane range; values are not clamped)
|
inline |
Sets the gain for a band as a normalized volume (-1.0 to 1.0), mapped to -90dB..+12dB. For deeper cuts/boosts use setBandDB() directly.
|
inline |
Sets the same gain for all bands.
|
inlineinherited |
Deactivate/Reactivate automatic AudioInfo updates: (default is active)
|
inlineprotected |
Determines the fft bin range and center frequency of each logarithmically spaced band between 20Hz and Nyquist
|
inlineoverridevirtualinherited |
Implements AudioOutput.
|
inlineoverridevirtualinherited |
Reimplemented in MetaDataOutput, and MultiOutput.
|
inlinevirtualinherited |
Writes n 0 values (= silence)
| len |
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |