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 85937 times) previous topic - next topic
0 Members and 2 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