Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_vis_spectrum_analyzer (Read 72514 times) previous topic - next topic
Majestyk and 3 Guests are viewing this topic.

Re: foo_vis_spectrum_analyzer

Reply #50
Thanks for the updated config GUI.  One thing that would help, would be if it were made clearer which settings affected use as a frequency spectrum analyzer as opposed to a musical spectrum display.  It's my understanding that it is meant to serve both functions optionally.  Maybe splitting off the parts of the config that only affect one or the other?

Also, it would be nice to see a clarification of what the settings actually do, perhaps in a readme (skew factor, bandwidth, use absolute, smooth lower frequencies, etc.).

Very nice work!

Re: foo_vis_spectrum_analyzer

Reply #51
One thing that would help, would be if it were made clearer which settings affected use as a frequency spectrum analyzer as opposed to a musical spectrum display.  It's my understanding that it is meant to serve both functions optionally.  Maybe splitting off the parts of the config that only affect one or the other?
In general everything on the left half affects the transform calculations. Everything on the right half is for graphing and eye candy.
Also, it would be nice to see a clarification of what the settings actually do, perhaps in a readme (skew factor, bandwidth, use absolute, smooth lower frequencies, etc.).
I started updating the wiki but it needs a lot more work. And to be frank, some of the parameters I don't understand myself yet  :D .
Very nice work!
Thank you.

Re: foo_vis_spectrum_analyzer

Reply #52
Thanks for the info!  These are my current configuration settings designed for frequency (as opposed to musical) spectrum display;  I am using a Refresh Rate Limit of 60 Hz:



Also found some term definitions by googling that may help others too:

Bandwidth:  "Resolution bandwidth (ResBW or RBW) affects the following:

    The frequency resolution for spectrum traces
    How fast the VSA makes a measurement

Because resolution bandwidth is directly related to measurement time, manually selecting a narrower resolution bandwidth can slow down a measurement more than necessary. Selecting a resolution bandwidth that is too wide, on the other hand, may not provide adequate resolution and can obscure spectral components that are close together."

Skew:  "Skewness is a measure of the asymmetry of the distribution of a variable. The skew value of a normal distribution is zero, usually implying symmetric distribution."

Re: foo_vis_spectrum_analyzer

Reply #53
Also, it would be nice to see a clarification of what the settings actually do, perhaps in a readme (skew factor, bandwidth, use absolute, smooth lower frequencies, etc.).
I started updating the wiki but it needs a lot more work. And to be frank, some of the parameters I don't understand myself yet  :D .
What I meant by these parameter names (since this component is basically a reimplementation of my own WebAudio visualizer as fb2k component anyway):
  • Skew factor: Basically a parameter that affects any adjustable frequency scaling functions like hyperbolic sine and nth root. Higher values means more linear spectrum (in the case of Avee Player's frequency distribution, exactly linear when this parameter is 1)
  • Bandwidth: Basically a distance between low and high frequency boundaries for each band, I think this parameter is more useful for constant-Q/variable-Q transforms and Mel/triangular filterbank energies (higher values smooths out the spectrum and reduces the visual noise) than bandpower mode that we have currently at the time
  • Use absolute: Which sets min dB range to -Infinity dB (0.0 on linear amplitude) when enabled. This only applies when not using logarithmic amplitude scale (or in other words, using linear/nth root amplitude scaling) as by mathematical definition, logarithm of any base of zero is always -Infinity
  • Smooth lower frequencies: When enabled, the bandpower part is only gets used when number of FFT bins to sum for each band is at least two or more (rather than one in the case of this parameter is set to disabled, which of course, has artifacts on lower frequencies similar to ones seen in spectrum visualizations on YouTube videos generated by ZGameEditor Visualizer that comes with FL Studio like this), otherwise a sinc/Lanczos-interpolated spectrum

Also, the peak mode named "AIMP" is a recreation of peak indicator behaviors of spectrum visualizations on certain AIMP4/5 skins (as well as the Mel scale since spectrum analyzer element in AIMP skins uses Mel not logarithmic)

Re: foo_vis_spectrum_analyzer

Reply #54
Thank you very much. Great component.

I've two observations using the component as a popup window, not a layout element.

  • There's a white border inside the window frame. Is it possible to hide it?
  • Visualization doesn't work when I show the popup window the first time after launching the program and playing a track. I have to replay the currently playing track to make it work. But it works as expected after that even if I close and show the popup window again.

Re: foo_vis_spectrum_analyzer

Reply #55
By a "pop-up window", do you mean foo_flowin?

Re: foo_vis_spectrum_analyzer

Reply #56
@sveakul

Probably, Menu > View > Visualizations > Spectrum Analyzer

> 2. Visualization doesn't work when I show the popup window the first time after launching the program and playing a track. I have to replay the currently playing track to make it work. But it works as expected after that even if I close and show the popup window again.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY ULT WEAR (made a Upgrade/Balanced Cable by myself)

Re: foo_vis_spectrum_analyzer

Reply #57
@sveakul @Air KEN

Yes, I'm referring to the Main Menu. "Menu > View > Visualizations > Spectrum Analyzer"

Re: foo_vis_spectrum_analyzer

Reply #58
@MG240

1. I don't think it's possible. "Flowin" It is possible to do it without a frame, but it seems impossible.
2. Is the same. Same goes for "Flowin".
----
If you use PopUp with CUI, you can use Spectrum Analyzer.
"Menu > View > Visualizations > Spectrum Analyzer" or "Flowin".
Spectrum Analyzer Configuration Display can also be used.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY ULT WEAR (made a Upgrade/Balanced Cable by myself)

Re: foo_vis_spectrum_analyzer

Reply #59
Thank you very much. Great component.
Thank you.
There's a white border inside the window frame. Is it possible to hide it?
I don't see what I can do about that. It's the window frame as specified by foobar2000. If Peter is listening...
Visualization doesn't work when I show the popup window the first time after launching the program and playing a track. I have to replay the currently playing track to make it work. But it works as expected after that even if I close and show the popup window again.
I can't reproduce that but it seems related to other display problems that have been posted here. Hard to fix if I can't see what's wrong.

Re: foo_vis_spectrum_analyzer

Reply #60
New GUI is fantastic! many thanks
Could you please make V & H grid checkboxes so they can be shown/hidden independently?

Re: foo_vis_spectrum_analyzer

Reply #61
@pqyt

> 2. Visualization doesn't work when I show the popup window the first time after launching the program and playing a track. I have to replay the currently playing track to make it work. But it works as expected after that even if I close and show the popup window again.

Not made into a panel. Display in PopUp.

1. Play the track.
2. "Menu > View > Visualizations > Spectrum Analyzer"  start.
3. Spectrum Analyzer screen is the same as when stopped.
4. Play the track.
5. Spectrum Analyzer starts working.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY ULT WEAR (made a Upgrade/Balanced Cable by myself)

Re: foo_vis_spectrum_analyzer

Reply #62
@pqyt

> 2. Visualization doesn't work when I show the popup window the first time after launching the program and playing a track. I have to replay the currently playing track to make it work. But it works as expected after that even if I close and show the popup window again.

Not made into a panel. Display in PopUp.

1. Play the track.
2. "Menu > View > Visualizations > Spectrum Analyzer"  start.
3. Spectrum Analyzer screen is the same as when stopped.
4. Play the track.
5. Spectrum Analyzer starts working.
Found it and fixed it. A case of early code optimization. This will probably also be the solution for the other bug reports.

Re: foo_vis_spectrum_analyzer

Reply #63
@pqyt

Thanks a lot that's wonderful. Also, this is what I mean with the white border.

X


Re: foo_vis_spectrum_analyzer

Reply #65
v0.3.0.0, 2023-11-20

* New: Implemented a first version of a Constant-Q transform (CQT). Default is still FFT.
* New: A custom FFT size can be specified in the configuration dialog.
* New: A sample rate-based FFT size can be specified in the configuration dialog. The FFT size will be calculated based on the duration specified and the sample rate of the track being played.
* New: Implemented Mel scale mapping of the FFT coefficients.
* New: X-axis and Y-axis can hidden by selecting the "None" mode of each of the axes.
* Improved: Added a versioning mechanism to the settings of the component. Unfortunate side-effect: Any configuration will be reset.
* Improved: Tweaked the layout and the size of the configuration dialog a little bit.
* Improved: Removed the client edge of the window for a cleaner look.
* Fixed: The configuration dialog disabled the decibel settings when selecting a logarithmic Y-axis scale.
* Fixed: Opening the visualization when a track was already playing did not show the spectrum.

You can download it from the Components repository.

Re: foo_vis_spectrum_analyzer

Reply #66
Thanks for the new version!  Is there any possibility of adding a frequency scale to the bottom X-axis that would conform to what the user specified in the "Frequency Range" config, with appropriate increments marked?

Re: foo_vis_spectrum_analyzer

Reply #67
v0.3.0.0, 2023-11-20

* New: Implemented a first version of a Constant-Q transform (CQT). Default is still FFT.
Finally, a real-time CQT visualization for foobar2000, so do anyone remember that @Peter tried to implement the kind of algorithm but it was scrapped due to how CPU-intensive it is for an audio visualization?

Of course, the window function has to be applied in the frequency domain for sliding DFT-based CQT/VQT visualizations, so only cosine-sum windows can be used here unless a kernel windowing technique as in this paper is implemented. Also, SWIFT algorithm doesn't even need a window function, it just have to be cascaded (4th order is Gammatone-like response, and anything higher approaches into a Gaussian frequency response) as in this CodePen project to have decent sidelobe attenuation at the expense of slower reaction time on longer window sizes

* New: A custom FFT size can be specified in the configuration dialog.
* New: A sample rate-based FFT size can be specified in the configuration dialog. The FFT size will be calculated based on the duration specified and the sample rate of the track being played.
I should note that foobar2000's built-in spectrum visualization also have this behavior (8192 samples on 48kHz sampling rate, 16384 samples on 96kHz sampling rate, etc.) to get approximately 5Hz frequency resolution (except it is less precise here since fb2k's built-in FFT visualizations have FFT sizes limited to power of two)

* New: Implemented Mel scale mapping of the FFT coefficients.
Well, it is a triangular filter bank (except it can accept arbitrary frequency scaling as opposed to only Mel) right?

Re: foo_vis_spectrum_analyzer

Reply #68
@pqyt

Much appreciated. I've noticed the full screen mode is greyed out in the new release. Is it for the time being?

Re: foo_vis_spectrum_analyzer

Reply #69
@pqyt
Much appreciated. I've noticed the full screen mode is greyed out in the new release. Is it for the time being?
Yes, it'll come back. I had problems with the state management and didn't want to delay this release.


Re: foo_vis_spectrum_analyzer

Reply #71
I went with the Mel name because that's what I found articles about. If "Triangular Filter Bank" is more accurate, I'll change it.
The term "Triangular Filter Bank" is more accurate since this component supports arbitrary frequency scales regardless of audio spectrum types (e.g. you can have logarithmic frequency scale on a triangular filterbank energies representation)

Re: foo_vis_spectrum_analyzer

Reply #72
Quote
I went with the Mel name because that's what I found articles about.

The Story of Mel, a Real Programmer

( :D & offtopic but obligatory reference, my apologies)

Thanks for the component.
Quis custodiet ipsos custodes?  ;~)

Re: foo_vis_spectrum_analyzer

Reply #73
@pyqt -- Thank you for a very very nice component!

I am running 0.3.0.0 and I've observed some issues.
I activate this component via the foobar menu  View -> Visualizations -> Spectrum Analyzer.

These  are my settings:



This is the spectrum display that I see:



I have the following issues:
  • the Y axis doesn't show the full -120dB scale
  • the X axis frequency is not shown
  • the X axis seems to be cutoff at 3kHz -- the spectrum display should run until 40kHz

Is there some configuration changes I need to make?


Re: foo_vis_spectrum_analyzer

Reply #74
Hi: @boxerfan88

Two of my laptops are experiencing the same symptoms.
Is it a similar environment?

Lenovo ideapad S145
AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx 2.10 GHz
AMD Radeon(TM) Vega 8 Graphics
Display:
15.6
1920x1080
Scale:125%

DellVostro3500
11th Gen Intel(R) Core(TM) i3-1115G4 @ 3.00GHz 3.00 GHz
Intel(R) UHD Graphics
Display:
15.6
1920x1080
Scale:125%

foobar2000 v2.1 preview 2023-11-09 64-bit

SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY ULT WEAR (made a Upgrade/Balanced Cable by myself)