foobar2000:Components/FFT Analyzer (foo_fft_analyzer)

From Hydrogenaudio Knowledgebase
Jump to: navigation, search
FFT Analyzer
Foo fft analyzer.png
Developer(s) Alireza Ayoubi (Wamoc)
Repository
Release information
Initial release May 19, 2023; 0 years ago
Stable release 1.0.0
Preview release
foobar2000 compatibility
Minimum version 2.0
Maximum version {{{foobar2000_maximum}}}
UI module(s) Default UI, Columns UI
Additional information
Use Visualization
License Proprietary freeware
Discussion thread {{{discussion_thread}}}
View all components

A spectrum analyzer component additional features like spectrogram visualization combined with spectrum bars.

Compatible with both default UI and Columns UI.

Options

The options for FFT Analyzer component is many as usual with Wamoc's components.

FFT

Input size

Audio input buffer size for discrete Fourier transform, higher values have better frequency resolution but it has worse temporal resolution.

Defaults to 4410 samples.

FFT size

The actual FFT size, de-coupled from input size. It will either wrap over[1] or zero pad the waveform depending if input size is bigger or smaller than FFT size. Works best with power of two sizes, but it doesn't have to.

Defaults to 4410 samples.

Window function

The window function to reduce spectral leakage.

Window function Formula
Rectangular f(x) = 1
Triangular f(x) = 1 - abs(x)
Hann f(x) = cos(x*PI/2)^2
Hamming f(x) = 0.54 + 0.46 * cos(x*PI)
Blackman f(x) = 0.42 + 0.5 * cos(x*PI) + 0.08 * cos(x*PI*2)
Nuttall f(x) = 0.355768 + 0.487396 * cos(x*PI) + 0.144232 * cos(2*x*PI) + 0.012604 * cos(3*x*PI)
Flat top f(x) = 0.21557895 + 0.41663158 * cos(x*PI) + 0.277263158 * cos(2*x*PI) + 0.083578947 * cos(3*x*PI) + 0.006947368 * cos(4*x*PI)
Kaiser f(x) = cosh(sqrt(1-(x ** 2)) * (windowParameter ** 2)) / cosh(windowParameter ** 2)

Defaults to Blackman.

Window parameter

The window parameter for certain window functions. Higher values have better sidelobe attenuation but with wider mainlobe width

Defaults to 1.

Window skew

Function that makes window function asymmetric. Positive values reacts eariler and vice versa.

Defaults to 0.

Frequency distribution

Frequency distribution type

The mode between frequency band distribution types. Note that it uses the same algorithm as Classic Spectrum Analyzer when set to Pseudo-Logarithmic and KeyboardAudioVisualizer when set to Piecewise Linear-Log, Piecewise Linear-Log 2 and Linear Averages.

Defaults to Octave bands.

Number of bands and bands per octave

The number of frequency bands, or bins per octave if the frequency distribution is set to Octave bands.

Defaults to 96 bands on frequency bands distribution, 1/12th octave on octave bands distribution.

Frequency range

The frequency range in Hz. Context aware as it can be set in either Hz or musical notes.

Defaults to 20Hz - 20kHz.

Frequency scale

The frequency scale for FFT frequency buckets. Available frequency scale is shown below

Frequency scale Foward formula Inverse formula
Linear x x
Logarithmic log2(x) 2^x
Mel log2(1 + x / 700) 700 * ((2 ^ x) - 1)
Bark (26.81 * x)/(1960 + x) - 0.53 1960 / (26.81 / (x + 0.53) - 1)
ERB log2(1 + x * 0.00437) 1 * ((2 ^ x) - 1) / 0.00437
Shifted logarithmic log2(x + hzLinearFactor) (2 ^ x) - hzLinearFactor
Hyperbolic sine asinh(x / hzLinearFactor) sinh(x) * hzLinearFactor
Nth root x ^ (1/nthRoot) x ^ nthRoot
Negative exponential -2 ^ (-x/hzLinearFactor) -log2(-x) * hzLinearFactor
Adjustable bark (26.81 * x)/(hzLinearFactor + x) hzLinearFactor / (26.81 / x - 1)

Defaults to Logarithmic.

Hz linear factor

A parameter for adjustable frequency scales. Higher values shows more high frequencies. (Frequency bands and Piecewise Linear-Log 2 only)

Defaults to 50Hz

Tuning

Frequency tuning for octave bands visualization, centered at specified frequency on specified note.

Defaults to 440Hz on A4

Amplitude

Note that it has separate values for spectrum analyzer and spectrogram.

Logarithmic amplitude scale

Toggles between linear/nth root and logarithmic/decibel amplitude scale

Defaults to True.

dB range

The dB range of audio spectrum visualization.

Defaults to -12dB to -82dB.

Inverse gamma factor

The inverse gamma factor, higher values shows more quieter signals

Defaults to 1 (linear amplitude scale).

Use absolute amplitude

When enabled, the minimum dB range is -Infinity. This does not apply to logarithmic amplitude scale.

Defaults to True.

Visualization

Reflex mode

The mode which reflex is either mirrored spectrum or spectrogram.

Defaults to Spectrogram.

Color gradient

Can be either gradient or a solid color, but it can also be set to WhiteCap-style dynamic gradients. This option is separate for both spectrum and spectrogram respectively and it can also be set independently for each channel.

Defaults to Classic.

Channel mode

The mode specifies how the visualizer should display multiple channels. It can be set to Combined to display all channels with different colors in the same display, or Separate to display channels separately.

Defaults to Combined.

Channel configuration

The modes specifies the handling of multiple channels. It can be set to either Stereo (Left/Right), or Channel differences (Mid/Side).

Defaults to Stereo.

References

  1. The opposite of zero-padding section at Extra-wide window functions on Signalsmith Audio's blog post

External links