Difference between revisions of "Foobar2000:Components/Spectrum Analyzer (foo vis spectrum analyzer)"

From Hydrogenaudio Knowledgebase
Jump to: navigation, search
(Updated the Transform page documentation.)
Line 30: Line 30:
 
=== Configure ===
 
=== Configure ===
  
Select '''Configure''' from the context menu to open the configuration dialog.
+
Opens the Configuration dialog.
  
 
=== Toggle Full-Screen Mode ===
 
=== Toggle Full-Screen Mode ===
Line 52: Line 52:
 
Prevents the refresh of the component, effectively reducing CPU and GPU use to 0.
 
Prevents the refresh of the component, effectively reducing CPU and GPU use to 0.
  
== Configuration ==
+
== Configuration dialog ==
  
[[File:foo_vis_spectrum_analyzer_transform.png|thumb|256px|Spectrum Analyzer Configuration: Transform]]
+
=== Transform page ===
[[File:foo_vis_spectrum_analyzer_spectrum.png|thumb|256px|Spectrum Analyzer Configuration: Spectrum]]
+
  
=== Transform ===
+
==== Transform ====
 +
 
 +
[[File:foo_vis_spectrum_analyzer_transform.png|thumb|256px|Spectrum Analyzer Configuration: Transform]]
  
 
'''Method'''
 
'''Method'''
  
Allows you to select the Time to Frequency domain transform. Currently Fast Fourier (FFT) and Constant-Q (CQT) transforms are implemented.
+
Allows you to select the Time to Frequency domain transform. The following transforms are implemented:
  
'''Window Function'''
+
* Fast Fourier (FFT)
 +
* Constant-Q (CQT)
 +
* Sliding Windowed Infinite Fourier (SWIFT)
 +
* Analog-style
  
Selects the window function that will be applied to the Time data.
+
'''Window function'''
  
'''Window Parameter'''
+
Selects the window function that will be applied to the samples (Time domain).
  
Allows you to tweak window functions that support a parameter.
+
'''Window parameter'''
  
'''Window Skew'''
+
Allows you to tweak window functions that support a parameter like Gaussian and Kaiser.
  
Skew factor for the window function.
+
'''Window skew'''
  
'''Channels'''
+
Adjusts how the window function reacts to samples. Positive values makes it skew towards latest samples while negative values skews towards earliest samples. Defaults to 0 (None).
  
Allows you to select that audio channels that will be used to calculate the transform.
+
'''Reaction alignment'''
 +
 
 +
Controls the delay between the actual playback and the visualization.
 +
 
 +
* < 0: All samples are ahead of the playback sample (with the first sample equal to the actual playback sample).
 +
* = 0: The first half of samples are behind the current playback sample and the second half are ahead of it.
 +
* > 0: All samples are behind the playback with the last sample equal to the current playback sample.
  
=== FFT ===
+
==== Fourier Transform ====
  
 
Groups the parameters that influence the Fast Fourier transform.
 
Groups the parameters that influence the Fast Fourier transform.
  
'''FFT Size'''
+
'''No. of bins'''
  
Specifies the size of the FFT window as a number between 64 and 32768.
+
Specifies the number of bins used by the transforms as a number between 64 and 32768.
  
Select ''Custom'' to specify a number that is not a power of 2. This will consume a lot more CPU power.
+
* Select ''Custom'' to specify a number that is not a power of 2. This will consume a lot more CPU power.
Select ''Sample rate based'' to specify the size as a duration. F.e. 100ms of a track sampled at 44.1kHz will result in an FFT window of 4410 samples.
+
* Select ''Sample rate based'' to specify the size as a duration. F.e. 100ms of a track sampled at 44.1kHz will result in an FFT window of 4410 samples.
  
'''Summation'''
+
'''Coefficient aggregation'''
  
Determines which method is used to sum the coefficients of FFT.
+
Determines which method is used to aggregate the coefficients of FFT.
  
    Minimum
+
* Minimum
    Maximum
+
* Maximum
    Sum
+
* Sum
    Residual Mean Square (RMS)
+
* Residual Mean Square (RMS)
    RMS Sum
+
* RMS Sum
    Average
+
* Average
    Median
+
* Median
 +
 
 +
'''Mapping'''
 +
 
 +
Determines how the FFT coefficients are mapped to the frequency bins.
 +
 
 +
* Standard
 +
* Triangular Filter Bank
 +
* Brown-Puckette CQT
  
 
'''Smooth lower frequencies'''
 
'''Smooth lower frequencies'''
 +
 +
When enabled, the band power part only gets used when number of FFT bins to sum for each band is at least two or more.
  
 
'''Smooth gain transition'''
 
'''Smooth gain transition'''
 +
 +
Smooths the frequency slope of the aggregation modes.
  
 
'''Lanczos kernel'''
 
'''Lanczos kernel'''
Line 110: Line 132:
 
Determines the size of the Lanczos kernel. The kernel is used to create a smooth transition between the FFT coefficients resulting in a visual pleasing result.
 
Determines the size of the Lanczos kernel. The kernel is used to create a smooth transition between the FFT coefficients resulting in a visual pleasing result.
  
=== Frequencies ===
+
==== Brown-Puckette CQT Mapping ====
 +
 
 +
'''Bandwidth offset'''
 +
 
 +
Offsets the bandwidth of the Brown-Puckette CQT.
 +
 
 +
'''Bandwidth cap'''
 +
 
 +
Minimum Brown-Puckette CQT kernel size.
 +
 
 +
'''Bandwidth amount'''
 +
 
 +
The Brown-Puckette CQT kernel size.
 +
 
 +
'''Granular bandwidth'''
 +
 
 +
When disabled constrains the bandwidth to powers of 2.
 +
 
 +
'''Kernel shape'''
 +
 
 +
Determines the shape of the Brown-Puckette CQT kernel.
 +
 
 +
'''Kernel shape parameter'''
 +
 
 +
Parameter used by certain window functions like Gaussian and Kaiser windows.
 +
 
 +
'''Kernel asymmetry'''
 +
 
 +
Adjusts how the window function reacts to samples. Positive values makes it skew towards latest samples while negative values skews towards earliest samples.
 +
 
 +
==== Infinite Impulse Response (IIR) ====
 +
 
 +
Groups the parameters used by the SWIFT and the Analog-style transforms.
 +
 
 +
'''Filter bank order'''
 +
 
 +
Determines the order of the filter bank used to calculate the SWIFT and Analog-style transforms.
 +
 
 +
'''Time resolution'''
 +
 
 +
Determines the maximum time resolution used by the SWIFT and Analog-style transforms.
 +
 
 +
'''Bandwidth'''
 +
 
 +
Determines the bandwidth used by the SWIFT and Analog-style transforms.
 +
 
 +
'''Constant-Q'''
 +
 
 +
Uses constant-Q instead of variable-Q in the IIR transforms.
 +
 
 +
'''Compensate bandwidth'''
 +
 
 +
Compensate bandwidth for narrowing on higher order IIR filters banks.
 +
 
 +
'''Use prewarped Q'''
 +
 
 +
Prewarps Q to ensure the actual bandwidth is truly logarithmic at anything closer to the Nyquist frequency.
 +
 
 +
=== Frequencies page ===
 +
 
 +
[[File:foo_vis_spectrum_analyzer_frequencies.png|thumb|256px|Spectrum Analyzer Configuration: Frequencies]]
  
 
Groups the parameters that determine the frequency range that will be displayed.
 
Groups the parameters that determine the frequency range that will be displayed.
Line 265: Line 347:
  
 
Click any of the colors to modify.
 
Click any of the colors to modify.
 +
 +
== Filters ==
 +
 +
[[File:foo_vis_spectrum_analyzer_filters.png|thumb|256px|Spectrum Analyzer Configuration: Filters]]
 +
 +
== Common ==
 +
 +
[[File:foo_vis_spectrum_analyzer_common.png|thumb|256px|Spectrum Analyzer Configuration: Common]]
 +
 +
== Visualization ==
 +
 +
[[File:foo_vis_spectrum_analyzer_visualization.png|thumb|256px|Spectrum Analyzer Configuration: Visualization]]
 +
 +
'''Channels'''
 +
 +
Allows you to select that audio channels that will be used to calculate the transform.
 +
 +
== Styles ==
 +
 +
[[File:foo_vis_spectrum_analyzer_styles.png|thumb|256px|Spectrum Analyzer Configuration: Styles]]
 +
 +
== Presets ==
 +
 +
[[File:foo_vis_spectrum_analyzer_presets.png|thumb|256px|Spectrum Analyzer Configuration: Presets]]
  
 
== External links ==
 
== External links ==
 
* {{foobar2000|https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer|Spectrum Analyzer (foo_vis_spectrum_analyzer)}}
 
* {{foobar2000|https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer|Spectrum Analyzer (foo_vis_spectrum_analyzer)}}
 
* {{ha|https://hydrogenaud.io/index.php/topic,125031.0.html}}
 
* {{ha|https://hydrogenaud.io/index.php/topic,125031.0.html}}
 +
 
== See also ==
 
== See also ==
* [https://codepen.io/TF3RDL/pen/poQJwRW Frequency bands spectrum analyzer using either FFT or CQT] on CodePen (which this component is based on)
+
* [https://codepen.io/TF3RDL/pen/poQJwRW Frequency bands spectrum analyzer using either FFT or CQT] on CodePen (on which part of this component is based).

Revision as of 08:10, 15 April 2024

Spectrum Analyzer
Spectrum Analyzer.png
Developer(s) pqyt
Repository Github
Release information
Initial release
Stable release 0.7.5.4 (April 13, 2024; 0 years ago)
Preview release
foobar2000 compatibility
Architecture x86 32-bit, x86 64-bit
Minimum version 2.0
Maximum version
UI module(s) Default UI, Columns UI
Additional information
Use Visualization
License MIT License
Discussion thread {{{discussion_thread}}}
View all components

A recreation of Musical Spectrum component for foobar2000 v2.x and 64-bit versions. Windows 10 or higher are the only supported operating systems.

You can double-click the component window to switch between windowed and full-screen mode. Note that when using the Default User Interface (DUI) the full-screen version is another instance of the component with its own configuration. When you use the Columns User Interface (CUI) the existing instance will be resized to occupy the full screen.

Context Menu

Right-click on the component window to display the context menu. The following options are available:

Configure

Opens the Configuration dialog.

Toggle Full-Screen Mode

Toggles full-screen mode off and on.

Frame Counter

Enables the display of a rudimentary frame counter.

Refresh Rate Limit

Allows you the selected the refresh rate of the component animation. Note that even though the component can redraw its visuals very fast the actual maximum refresh rate is usually determined by the refresh rate of your monitor.

Presets

Contains a list of previously saved presets. Select one from the list to activate it.

Freeze

Prevents the refresh of the component, effectively reducing CPU and GPU use to 0.

Configuration dialog

Transform page

Transform

Spectrum Analyzer Configuration: Transform

Method

Allows you to select the Time to Frequency domain transform. The following transforms are implemented:

  • Fast Fourier (FFT)
  • Constant-Q (CQT)
  • Sliding Windowed Infinite Fourier (SWIFT)
  • Analog-style

Window function

Selects the window function that will be applied to the samples (Time domain).

Window parameter

Allows you to tweak window functions that support a parameter like Gaussian and Kaiser.

Window skew

Adjusts how the window function reacts to samples. Positive values makes it skew towards latest samples while negative values skews towards earliest samples. Defaults to 0 (None).

Reaction alignment

Controls the delay between the actual playback and the visualization.

  • < 0: All samples are ahead of the playback sample (with the first sample equal to the actual playback sample).
  • = 0: The first half of samples are behind the current playback sample and the second half are ahead of it.
  • > 0: All samples are behind the playback with the last sample equal to the current playback sample.

Fourier Transform

Groups the parameters that influence the Fast Fourier transform.

No. of bins

Specifies the number of bins used by the transforms as a number between 64 and 32768.

  • Select Custom to specify a number that is not a power of 2. This will consume a lot more CPU power.
  • Select Sample rate based to specify the size as a duration. F.e. 100ms of a track sampled at 44.1kHz will result in an FFT window of 4410 samples.

Coefficient aggregation

Determines which method is used to aggregate the coefficients of FFT.

  • Minimum
  • Maximum
  • Sum
  • Residual Mean Square (RMS)
  • RMS Sum
  • Average
  • Median

Mapping

Determines how the FFT coefficients are mapped to the frequency bins.

  • Standard
  • Triangular Filter Bank
  • Brown-Puckette CQT

Smooth lower frequencies

When enabled, the band power part only gets used when number of FFT bins to sum for each band is at least two or more.

Smooth gain transition

Smooths the frequency slope of the aggregation modes.

Lanczos kernel

Determines the size of the Lanczos kernel. The kernel is used to create a smooth transition between the FFT coefficients resulting in a visual pleasing result.

Brown-Puckette CQT Mapping

Bandwidth offset

Offsets the bandwidth of the Brown-Puckette CQT.

Bandwidth cap

Minimum Brown-Puckette CQT kernel size.

Bandwidth amount

The Brown-Puckette CQT kernel size.

Granular bandwidth

When disabled constrains the bandwidth to powers of 2.

Kernel shape

Determines the shape of the Brown-Puckette CQT kernel.

Kernel shape parameter

Parameter used by certain window functions like Gaussian and Kaiser windows.

Kernel asymmetry

Adjusts how the window function reacts to samples. Positive values makes it skew towards latest samples while negative values skews towards earliest samples.

Infinite Impulse Response (IIR)

Groups the parameters used by the SWIFT and the Analog-style transforms.

Filter bank order

Determines the order of the filter bank used to calculate the SWIFT and Analog-style transforms.

Time resolution

Determines the maximum time resolution used by the SWIFT and Analog-style transforms.

Bandwidth

Determines the bandwidth used by the SWIFT and Analog-style transforms.

Constant-Q

Uses constant-Q instead of variable-Q in the IIR transforms.

Compensate bandwidth

Compensate bandwidth for narrowing on higher order IIR filters banks.

Use prewarped Q

Prewarps Q to ensure the actual bandwidth is truly logarithmic at anything closer to the Nyquist frequency.

Frequencies page

Spectrum Analyzer Configuration: Frequencies

Groups the parameters that determine the frequency range that will be displayed.

Distribution

Determines which parameters are used to generate the frequency bands.

   Linear: Generate frequency bands based on the frequency parameters.
   Octaves: Generate frequency bands based on the note parameters.
   AveePlayer: Generate frequency bands used by AveePlayer.

No. of bands

Specifies the number of frequency bands to generate (2 to 512) in the specified frequency range.

Frequency range

Frequency of the first and last band, 1Hz to 96000Hz.

Note range

Available when selecting the Octaves distribution. Select a range between the C note of octave 0 and B# of octave 11 (max. 144 notes or 12 octaves)

Bands per octave

Number of bands per octave (1 to 48)

Pitch

Tuning pitch (A4 = 440.0Hz), 1Hz to 96000Hz.

Transpose

Detuning offset (-24 to 24)

Scaling

Determines which frequency scaling function is used.

   Linear
   Logarithmic
   Shifted logarithmic
   Mel (AIMP)
   Bark
   Adjustable Bark
   ERB
   Cams
   Hyperbolic Sine
   Nth Root
   Negative exponential
   Period

Skew factor

Bandwidth

Determines the width of a frequency band. (0.0 to 64.0)

X axis

Groups the parameters that determine the way the X axis is displayed.

Mode

Determines which X axis to display.

   None: Hides the X axis.
   Bands: Center frequency of a band, every 10 bands.
   Decades: Fixed frequency range
   Octaves: Frequency of the C note of each octave
   Notes: C note of each octave

Y axis

Groups the parameters that determine the way the Y axis is displayed.

Mode

Determines which Y axis to display.

   Note: Hides the Y axis
   Decibel scale
   Logarithmic

Amplitude range

Determines the minimum and maximum amplitude, expressed in decibel (dB), to display.

Amplitude step

Determine the step size between the min. and max. amplitude.

Use absolute

Gamma

Bands

Color scheme

Specifies the color scheme used to render the spectrum.

   Solid color
   Custom
   Prism 1
   Prism 2
   Prism 3
   foobar2000
   foobar2000 Dark Mode
   Fire

Double-click a color to modify it. Modifying a color automatically selects the Custom color scheme. Press the Add' button to add a color, Remove to remove a color, Reverse to reverse the color scheme.

Band background

Enable the check box to see a background behind every band of the spectrum.

Tooltips

Enable the check box to see a tooltip with the center frequency and when appropriate, the name of the note, of the frequency band.

Smoothing

Specifies how the spectrum will be smoothed over time.

   Average
   Peak

Smoothing factor

Specifies the strength of the smoothing (0.0 to 1.0)


Peak mode

Specifies how the peak indicators are rendered.

   None
   Classic
   Gravity
   AIMP
   Fade Out

Hold time

Specifies how long a peak value will be held steady.

Acceleration

Specifies the acceleration used to modify the peak value.

Colors

Click any of the colors to modify.

Filters

Spectrum Analyzer Configuration: Filters

Common

Spectrum Analyzer Configuration: Common

Visualization

Spectrum Analyzer Configuration: Visualization

Channels

Allows you to select that audio channels that will be used to calculate the transform.

Styles

Spectrum Analyzer Configuration: Styles

Presets

Spectrum Analyzer Configuration: Presets

External links

See also