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 102967 times) previous topic - next topic
0 Members and 22 Guests are viewing this topic.

Re: foo_vis_spectrum_analyzer

Reply #775
I'm seeing a bug in Linux under WINE, and I understand that this may be a low priority to address, if at all. :) Perhaps it's something I can fix on my end by installing another library that other Linux users have encountered.

The problem is in the color selection dialog: the input boxes for the HSL and RGB values only permit two digits. They'll display the full initial value, but changing anything stops at two.
I have absolutely no way to replicate or test this. But I do know the implementation. The standard dialog has been extended with the alpha value and slider but anything else is standard Windows. The code that implements that dialog is Microsoft's and has not changed.

So I'd first look into similar bug reports on Wine, preferably those where the application extends the dialog.

Re: foo_vis_spectrum_analyzer

Reply #776
I'm seeing a bug in Linux under WINE, and I understand that this may be a low priority to address, if at all. :) Perhaps it's something I can fix on my end by installing another library that other Linux users have encountered.

The problem is in the color selection dialog: the input boxes for the HSL and RGB values only permit two digits. They'll display the full initial value, but changing anything stops at two.
I have absolutely no way to replicate or test this. But I do know the implementation. The standard dialog has been extended with the alpha value and slider but anything else is standard Windows. The code that implements that dialog is Microsoft's and has not changed.

So I'd first look into similar bug reports on Wine, preferably those where the application extends the dialog.

OK, following a few leads from here, I seem to have fixed the issue by installing the Microsoft Sans Serif Regular font. I just put it in ~/.local/share/fonts rather than using WINE to do it.

I did try a couple other things, and the residue is still present: I installed, through winetricks, the comdlg32ocx component. It's a 32-bit component in a 64-bit prefix, and it didn't seem to have any immediate effect, but it's still present after a full reboot, and I don't know how to uninstall it. Maybe it helped, I don't know.

I also tried changing the registry setting HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current\Version\FontSubstitutes\MS Shell Dlg to "MS Sans Serif". I'm not sure that this was necessary: in fact, I just changed it again to "Noto Sans" to match the fonts elsewhere. This seems to change the font in use throughout the Spectrum Analyzer configuration dialog, and the color dialog still works this way.

I guess just the presence of the MS Sans Serif font somewhere is enough to make the color picker happy.

 

Re: foo_vis_spectrum_analyzer

Reply #777
I'm using the peak meter, and I had trouble getting the bars to fill the space: there was a blank area to the left, and they only filled half of the space vertically (with a horizontal layout). I have since fixed it, but the fix seemed weird. The relevant settings were on the graphs page, unticking all of the "Top", "Bottom", "Left", and "Right" boxes. These were all grayed out since I had the Mode set to None for both axes, so I had to set the modes to something else to get at them first. Should they still affect things when so idled?

Re: foo_vis_spectrum_analyzer

Reply #778
I'm using the peak meter, and I had trouble getting the bars to fill the space: there was a blank area to the left, and they only filled half of the space vertically (with a horizontal layout). I have since fixed it, but the fix seemed weird. The relevant settings were on the graphs page, unticking all of the "Top", "Bottom", "Left", and "Right" boxes. These were all grayed out since I had the Mode set to None for both axes, so I had to set the modes to something else to get at them first. Should they still affect things when so idled?
It's a UI choice I had to make:

- Unchecking the boxes: Don't reserve space for the element.
- Color Source "None": Don't render.

There's an overlap for some elements but I keep it for consistency.

Re: foo_vis_spectrum_analyzer

Reply #779
Work in progress:

- Separate peak and RMS read-outs
- Left/Right and Mid/Side level meters with configurable channel pair.

Re: foo_vis_spectrum_analyzer

Reply #780
Work in progress:

- Vertical scrolling spectogram, aligned with the bars of the spectrum analysis on top.

Re: foo_vis_spectrum_analyzer

Reply #781
- Vertical scrolling spectogram, aligned with the bars of the spectrum analysis on top.
Finally, a sneak peek of combined spectrum/spectrogram visualization, which is I want for @Crossover's Enhanced Spectrum analyzer component

- Left/Right and Mid/Side level meters with configurable channel pair.
BTW, this makes me want more Mid/Side visualizations (e.g. a Mid/Side peak/RMS meter and a M/S spectrum analyzer)

Re: foo_vis_spectrum_analyzer

Reply #782
v0.8.0.0-beta1, 2024-05-01

* New: Left/Right and Mid/Side level meter.
  * The left/right channel pair is selectable.
* Spectogram
  * New: Vertical scrolling and static spectogram. A special setting is available to align the spectogram with a spectrum bars visualization over or under the spectogram.
  * Improved: Overall polishing and removal of glitches.
* Added: Separate peak and RMS level read outs to the peak meter.
* Fixed: An old color bug in the owner-drawn menu list.

You can only download it from GitHub until the final release.

I'd appreciate any (constructive) feedback about the implementation of the balance and correlation meter and the vertical spectogram.


Re: foo_vis_spectrum_analyzer

Reply #784
Based on how your plugin behaves/displays I guess you are calculating barwidth (vertical peakmeter) by first determining the total gauge gap by first multiplying the (unscaled) configuration value gauge gap times the number of channels (bars) to be displayed minus 1. Then I guess you scale this total gauge gap, subtract that value from the panelwidth and divide the result by the number of channels to find barwidth per bar. By scaling a calculated unscaled total gauge gap this value will be to high (except winth 200% and 300%), and subsequently your barwidth/barheight will be lower than I intended.
When you display bars, you apply single gauge gaps between channels leading to pixels that are left over and are distributed to the left of leftmost bar and to the right of rightmost bar.
You don't have to guess. The code is out in the open... ;-) That's almost exactly how the metrics are determined.
Please investigate ...
Will do.

Re: foo_vis_spectrum_analyzer

Reply #785
Based on how your plugin behaves/displays I guess you are calculating barwidth (vertical peakmeter) by first determining the total gauge gap by first multiplying the (unscaled) configuration value gauge gap times the number of channels (bars) to be displayed minus 1. Then I guess you scale this total gauge gap, subtract that value from the panelwidth and divide the result by the number of channels to find barwidth per bar. By scaling a calculated unscaled total gauge gap this value will be to high (except winth 200% and 300%), and subsequently your barwidth/barheight will be lower than I intended.
When you display bars, you apply single gauge gaps between channels leading to pixels that are left over and are distributed to the left of leftmost bar and to the right of rightmost bar.
You don't have to guess. The code is out in the open... ;-) That's almost exactly how the metrics are determined.
Please investigate ...
Will do.

I did check your code several times, but I'm not a C++ programmer. I did read that C++ also has const INTEGER.

My best guess is that 1 of these 4 FLOAT's has a decimal value instead of a truncated INTEGER value in case of other windows scaling than 100%, 200%, 300%:
Code: [Select]
    const FLOAT n = (FLOAT) _Analysis->_GaugeValues.size();
    const FLOAT TotalBarGap = _State->_GaugeGap * (n - 1);
    const FLOAT TickSize = 2.f;
    const FLOAT TotalTickSize = (_GraphSettings->_YAxisLeft ? TickSize : 0.f) + (_GraphSettings->_YAxisRight ? TickSize : 0.f);

which means that this line will produce a barheight that is too small in any scaling other than 100%, 200% and 300% which leads to an offset that is bigger than should be
Code: [Select]
        const FLOAT BarHeight = ::floor((_ClientSize.height - TotalBarGap - TotalTickSize) / n);

Anyway, I'm happy you are investigating. It's quite easy to spot when you put your scaling to 125% and display a 6ch peakmeter.

Re: foo_vis_spectrum_analyzer

Reply #786
Hello!
It's my first post in here. First of all I wanted to thank the author for developing such cool plugin, I love it!

Does anybody here struggle with framerate under Linux/Wine? I seem to be stuck at 20-40 fps depending on exact settings. I suspect something is wrong with my wine configuration, but it's hard to diagnose without any point of reference.

Re: foo_vis_spectrum_analyzer

Reply #787
Anyway, I'm happy you are investigating. It's quite easy to spot when you put your scaling to 125% and display a 6ch peakmeter.
I removed the rounding code. All math is done in DIP not pixels. If you think about it: rounding the values before giving them to Direct2D prevents it from choosing the correct pixel when it's time to create the final picture.

225 DPI with 7 bars and gauge gap of 1 DIP renders correctly now AFAICT.

Re: foo_vis_spectrum_analyzer

Reply #788
Anyway, I'm happy you are investigating. It's quite easy to spot when you put your scaling to 125% and display a 6ch peakmeter.
I removed the rounding code. All math is done in DIP not pixels. If you think about it: rounding the values before giving them to Direct2D prevents it from choosing the correct pixel when it's time to create the final picture.

225 DPI with 7 bars and gauge gap of 1 DIP renders correctly now AFAICT.

Good to know it now renders correctly. Can you point me to the version/beta of your plugin that renders correctly with different windows scaling?

I attached a screenshot from the 0.8.0.0beta1 for windows scaling 225%, 6ch, barwidth 11, gauge gap 2, no legend. Should be using 6x11 + 5x2 = 76 pixels. Included in text is my calculation of the required panel width and underneath are actual panel widths being used for your plugin and the old peakmeter spectrum (both being 76px).

On the left is your plugin and on the right a peakmeter spectrum (which is not aware of windows scaling) with hardcoded barwidth 11 and gauge gap 2.

As you can clearly see 0.8.0.0beta1 does NOT render the intended peakmeter correctly since it makes the barwidth incorrectly 1px smaller.

EDIT: For reference I included the same screenshot for windows scaling 100% which does render perfectly. 200% en 300% are correct as well of course.

Re: foo_vis_spectrum_analyzer

Reply #789
Work in progress: Radial spectrum bars

Re: foo_vis_spectrum_analyzer

Reply #790
Hello, I wanted to know if I could move from Musical Spectrum (https://hydrogenaud.io/index.php/topic,123956.0.html) to this plugin? Currently my Musical Spectrum config looks like this but I am confused as to how I can retain the same functionality and look with this plugin?

Re: foo_vis_spectrum_analyzer

Reply #791
Hello, I wanted to know if I could move from Musical Spectrum (https://hydrogenaud.io/index.php/topic,123956.0.html) to this plugin? Currently my Musical Spectrum config looks like this but I am confused as to how I can retain the same functionality and look with this plugin?
There's no way to import the config. The format is not documented. Just plug the values from the old component in the appropriate location of the new dialog.

Re: foo_vis_spectrum_analyzer

Reply #792
Work in progress: Radial spectrum bars
Basically one step closer to Trap Nation visualizer in foobar2000, only when combined with linear amplitude scale and narrow frequency range only covering lower frequencies as well as mirrored spectrum

And it is bringing the circular spectrum thing from audioMotion-analyzer to foobar2000 as a feature for this component, kinda reminds me of @TRCTheRaul porting Classic Spectrum Analyzer plugin for Winamp to MusicBee

Re: foo_vis_spectrum_analyzer

Reply #793
Please provide more details about what you think is wrong.
There are multiple Gaussian-like curves (asides the sidelobes from window function) that is not present in my own spectrum analyzer project on CodePen, even on the same window function and FFT settings (4096 samples Hann-windowed FFT) on a 50Hz test tone (though not tested on my own fb2k with foo_vis_spectrum_analyzer as it is obvious on the screenshots by someone else even if the audio source is not a test tone)

Maybe you can do rigorous testing to make sure that the results between these two are the same so long as the settings between your component (a C++ port of my own project, algorithm-wise) and my own project (not just this, but also another one) are the same as eachother (if applicable)?
Ah, I forgot to attach the 50Hz tone file and BTW, this should look like this within the default configuration (aside the color scheme resembling fb2k built-in "Spectrum" visualization and 20Hz-20kHz range):
Don't we forget about the "incorrect" looking sinc/Lanczos FFT interpolation for lower frequencies part in the default FFT mode? This is the most obvious discrepancy between my own CodePen project " Frequency bands spectrum analyzer using either FFT or CQT" and your fb2k visualization component

BTW, should we switch the FFT library to perhaps a modified version of PFFFT that supports double-precision floats and can utilize AVX2 if the PC's CPU support these instruction sets?

Re: foo_vis_spectrum_analyzer

Reply #794
Hi everyone,
just installed this nice component but don't understand how to configure it to display meterings like this (no background):



Thanks in advance to anyone that will help !
Hybrid Multimedia Production Suite will be a platform-indipendent open source suite for advanced audio/video contents production.
Official git: https://forart.it/HyMPS/

Re: foo_vis_spectrum_analyzer

Reply #795
In Configuration/Visualization choose Type=Bars and check "LEDs Enabled" box.  In Styles you can make the Background, etc. look like anything you want.

Re: foo_vis_spectrum_analyzer

Reply #796
Hello pqyt,

There is a gap between the Left (flipped) and Right channels in bar mode (also in spectrogram mode but I don't use it).
Would it be possible in a next relase to be able to ajust this gap to null ?
X

Re: foo_vis_spectrum_analyzer

Reply #797
Hello pqyt,

There is a gap between the Left (flipped) and Right channels in bar mode (also in spectrogram mode but I don't use it).
Would it be possible in a next relase to be able to ajust this gap to null ?
[attach type=image]30627[/attach]
Yes, an alignment option (left, right, center) is on the To Do list for the next version.

Re: foo_vis_spectrum_analyzer

Reply #798
Don't we forget about the "incorrect" looking sinc/Lanczos FFT interpolation for lower frequencies part in the default FFT mode? This is the most obvious discrepancy between my own CodePen project " Frequency bands spectrum analyzer using either FFT or CQT" and your fb2k visualization component
BTW, here's the spectrum of a 50Hz currently looks like using this component:
X

Also, I've fudged around with "lanzcos()" function on my spectrum analyzer project coded in JS to remove the multiplication by "alternating pattern" (which I meant by flipping a sign of both real and imaginary parts of FFT bins on every odd index) and it is not the same as this image above:
X

Re: foo_vis_spectrum_analyzer

Reply #799
Finally, we got the IIR filter bank spectrum analyzer for foobar2000, so if I see this actually working, I don't need Voxengo AnSpec or foo_dsp_vst3 anymore just for visualization
I've tested both of them but SWIFT and analog-style analyzer mode as in my own CodePen project aren't implemented properly, it currently look like this (music):
X
and this (sine wave sweep):
X
for both cases for screenshots of analog-style (IIR filter bank) mode

Also, both SWIFT and analog-style analyzer's output doesn't get reset upon seek (also applies to peak decay and time smoothing) unlike foo_enhanced_spectrum_analyzer