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

Re: foo_vis_spectrum_analyzer

Reply #325
BTW, the Equalize function (as in Winamp's Classic Spectrum Analyzer plugin) isn't the same as frequency slope I said before, but it is an analytical version of this

Also, the "RMS sum" mode for FFT bandpower (an approximate definite integral of discrete time Fourier transform) provides roughly +3dB per octave tilt on log frequency scale, especially on large FFTs but it highly depends on frequency scale (e.g. linear frequency scale gives 0dB per octave slope)

BTW, I'm curious about the "Median" summation mode, especially on what's the real and practical use of it over other summation methods (to combine multiple FFT bins into one bucket) like simply averaging multiple FFT bins on a FFT-based third octave analyzer?

Re: foo_vis_spectrum_analyzer

Reply #326
if the better CQT/VQT method (using sliding DFT of course as in my CodePen project that visualizes audio using AudioWorklet for sample acquisition for audio analysis algorithms, which BTW is still done in a main thread instead of audio processing thread, since it is for visualization, not for actual audio processing) is implemented, the dev @pqyt should mark the Goertzel-based CQT/VQT mode on this component as "legacy" (but it doesn't mean it didn't get updates, as my own project have downsample settings to trade off quality at lower frequencies in order to keep up with the performance of new sDFT-based one without downsampling and of course, the CQT time alignment parameter for Goertzel-based direct CQT calculation)

And I guess that standard window function (not even frequency domain-based ones) doesn't apply to sliding DFT's IIR cousin, the sliding windowed infinite Fourier transform and IIR bandpass filter bank right? Which makes sense since we have filter order parameter for both cascades, which is number of cascades (filter steepness) for these filters and for latter case, filter type parameter (which dictates the filter response shape just like window functions did to FIR-based methods)

Re: foo_vis_spectrum_analyzer

Reply #327
v0.7.0.0-beta-2, 2024-01-26

* New: Acoustic weighting filters (A-, B-, C-, D- and M-weighting (ITU-R 468))
* Improved: Curve mode no longer has vertical lines at the beginning and the end of the spectrum.
* Improved: The Curve line color can be specified.
* Improved: The Curve Peak line color can be specified.
* Fixed (Beta 1 regression): Crash when switching to full screen or when modifying the layout.

You can download it only from GitHub for now.

Re: foo_vis_spectrum_analyzer

Reply #328
A great thing that you have constructed!  Thank you!

Re: foo_vis_spectrum_analyzer

Reply #329
I have working code for the desktop window. I still have to experiment with a child window before I add the code to the component.

I almost have it working. I didn't copy your code but used this article from the same guy in your composition repo readme.

https://learn.microsoft.com/en-us/archive/msdn-magazine/2014/july/windows-with-c-embracing-the-windows-composition-engine

It uses a IDCompositionSurface rather than a swap chain/bitmap. It was easy enough to get working in a "clean" fb2k window but my attempts at mangling it in to main project have failed so far due to my incompetence. I'll have a another go tonight. :P
@marc2k3 ,

Done. Implemented in beta 3. I'll need a volunteer with a layered UI to confirm it works.

Re: foo_vis_spectrum_analyzer

Reply #330
v0.7.0.0-beta-1, 2024-01-21

* New: The cover art of the playing track can be used as background image.
  * Opacity can be specified.
  * The dominant color of the cover art can be used as a filler.
* New: The dominant colors of the cover art can be used to generate a gradient.
  * Color scheme "Artwork" turns on the feature.
  * Between 2 and 256 colors can be selected.
  * Lightness threshold determines which light colors will be ignored.
* New: The Curve visual has a peak line.
* New: Dark mode support.
* New: Fading AIMP peak mode, a combination of AIMP and Fade Out mode.
* Improved: Curve mode can use a horizontal gradient.
* Improved: The curve is no longer visible as a flat line if no track is playing.

You can download it only from GitHub.

This beta release contains a couple of eye candy additions and requests. Bugs can be expected but it has been stable in everyday use.

Hopefully I can focus on some analysis features now.

Installed the beta.

Can you please direct me to what settings I should apply so that the plugin does not paint the background or has it not been implemented?

See attached screenshots for the things I tried (next to old channel spectrum) ...
@Defender ,

Done. Implemented in beta 3. I'll need a volunteer with a layered UI to confirm it works.

 


Re: foo_vis_spectrum_analyzer

Reply #333
I like the plugin a lot, but unfortunately I went back to the previous version, the one without artwork management, because especially with radio and spin disc streaming I have scary slowdowns both in the graphic effects and in the rotation of the spin disc.

Spectrum Analyzer 0.6.0.3


Re: foo_vis_spectrum_analyzer

Reply #334
I like the plugin a lot, but unfortunately I went back to the previous version, the one without artwork management, because especially with radio and spin disc streaming I have scary slowdowns both in the graphic effects and in the rotation of the spin disc.

Spectrum Analyzer 0.6.0.3


The artwork and the color extraction is only done when once per track or when the parameters change. It must be something else.

Re: foo_vis_spectrum_analyzer

Reply #335
v0.7.0.0-beta-3, 2024-01-28

* New: Brown-Puckette constant Q transform.
* New: Background mode "None" does not draw a background resulting in transparent element.
* New: Full Screen mode for Columns UI.
* Improved: Bar width and peak indicator thickness get rounded to pixels for a more visually pleasing result.

You can download it only from GitHub for now.

Re: foo_vis_spectrum_analyzer

Reply #336
v0.7.0.0-beta-3, 2024-01-28

* New: Brown-Puckette constant Q transform.
* New: Background mode "None" does not draw a background resulting in transparent element.
* New: Full Screen mode for Columns UI.
* Improved: Bar width and peak indicator thickness get rounded to pixels for a more visually pleasing result.

You can download it only from GitHub for now.

I can confirm transparency works :-D

However, when you minimize foobar to the taskbar upon restoring it show a whitish background that only corrects upon repainting by resizing foobar. Starting another track that should force a repaint does not do the trick.

Edit:
It seems as if your plugin does not respond to normal panel refreshes. For instance when I click on my debugbutton to see the boundaries of plugins and to see the active location of different imagebuttons it does not not show the repaint I do with a alpha box before I redisplay the plugin. If I then minize foobar and restore you have the white screen again. Resizing foobar all of a sudden shows the colorbox at it should.

Another (minor) thing is that your plugin "blocks" the whole area I assigned to it and not only the area it is actually displaying to (the part under the curve line). So the imagebutton I activate in the same area does not work anywhere in the box. This is different from for instance the old Channel Spectrum where the imagebutton works in the upper part of the box.

Re: foo_vis_spectrum_analyzer

Reply #337
(v0.7.0.0-beta-3): Resizing visualization window crashes the program.

Re: foo_vis_spectrum_analyzer

Reply #338
(v0.7.0.0-beta-3): Resizing visualization window crashes the program.
Thx for the report. It's a whole new render technique.

Re: foo_vis_spectrum_analyzer

Reply #339
Seems like I really need to try your method. Using that link I posted, I got as far as making transparency working on startup but it goes to poop after a resize.

edit: just to be clear to anyone else stumbling across this, transparency works fine in released versions of JSP3. This is just a failed experiment trying to use newer windows APIs. :P

Re: foo_vis_spectrum_analyzer

Reply #340
Seems like I really need to try your method. Using that link I posted, I got as far as making transparency working on startup but it goes to poop after a resize.

edit: just to be clear to anyone else stumbling across this, transparency works fine in released versions of JSP3. This is just a failed experiment trying to use newer windows APIs. :P
I fixed the resize bug: multi-threading issue.

One remaining issue: when the parent window restores from a Minimized state the background transparency is lost. Recreating the buffer may fix it but I first have to find a way to get notified of the change in state. WM_SIZE is not sent to child windows after a restore because they did not change size.

Re: foo_vis_spectrum_analyzer

Reply #341
Seems like I really need to try your method. Using that link I posted, I got as far as making transparency working on startup but it goes to poop after a resize.

edit: just to be clear to anyone else stumbling across this, transparency works fine in released versions of JSP3. This is just a failed experiment trying to use newer windows APIs. :P
I fixed the resize bug: multi-threading issue.

One remaining issue: when the parent window restores from a Minimized state the background transparency is lost. Recreating the buffer may fix it but I first have to find a way to get notified of the change in state. WM_SIZE is not sent to child windows after a restore because they did not change size.
After some experimentation I've come to the conclusion that it is a problem of the hosts, both DUI and CUI. They assume the child window will render a solid background and simply do not repaint the background. This is not something I can fix. I've tried to force the parent window to repaint the background but no success so far.

Re: foo_vis_spectrum_analyzer

Reply #342
I don't claim to be any soft of expert in GUI programming but the requested pseudo transparency effect is not something host is resposible for. If you add support for that invention, you are supposed to handle the background rendering of the element behind you.

Re: foo_vis_spectrum_analyzer

Reply #343
I don't claim to be any soft of expert in GUI programming but the requested pseudo transparency effect is not something host is resposible for. If you add support for that invention, you are supposed to handle the background rendering of the element behind you.
No. That's the whole point. There is no background. All rendering is done in an offscreen buffer and merged into the composition chain. It is in effect painted on a glass plate. Anything below shines through. WPF and WinRT have no problem with it.

What is new is that I haven't found any example where the surface is used for a child window; all the examples use desktop windows. The Explorer background shines through. But, the desktop can't be minimized or resized.

Re: foo_vis_spectrum_analyzer

Reply #344
Well I'm certainly not an expert, but I do notice what happens.

Starting foobar I first get a white screen (is it foobar or CUI that hasn't adjusted this for dark mode?) and then very quickly the full layout plus plugins is painted.
When you minimize foobar and then restore you will see the white background on all Spidermonkey, WSH and JS2 panels and all plugins like ELP, Lyrics3, Mini-Waveseekbar, VU-Meter, Channel Spectrum and Peakmeter Spectrum.
Only JS3 panels (all the audiocontrol buttons and menu) and original WaveSeekbar does not seem to be affected by this white background.
This is repainted instantly for all above mentioned panels/plugins except for this component. Still annoying to see this white flashing though.

All panels and plugins except this one repaint on track change.
I wrote some code to detect if art that was not available upon starting the track (or stream) has been found (by the spidermonkey biography plugin) and if artwork is found I trigger a repaint myself by changing the dimensions of the top and bottom panel where this plugin resides without actually displaying them. Then I change dimensions back to the actual (unchanged) dimensions and show the panel (which is already shown). This invokes a repaint.
Difficult story but the effect is this invoked repaint also works for your plugin and restores the intended background.

Re: foo_vis_spectrum_analyzer

Reply #345
For the non-updating background when the track changes is an easy workaround.
Just add $showpanel_c(Spectrum Analyzer,0) before you do the normal $showpanel_c(Spectrum Analyzer,1).


Re: foo_vis_spectrum_analyzer

Reply #346
v0.7.0.0-beta-3, 2024-01-28

🙏 Thank you. It's running smoothly over here.

Visually I think this component is feature rich now. The only thing I can think of that other similar components have that this does not is

1. Bar mode: Unique peak color
2. Curve mode: Peak line secondary color (the background color of the area below the peak line). Like the Enhanced Spectrum Analyzer component. See below image as example
.

Re: foo_vis_spectrum_analyzer

Reply #347
v0.7.0.0-beta-4, 2024-01-29

* New: File path of the artwork can be specified as a file path or a title formatting script that returns a file path.
* Fixed (Beta 3 regression): Crash when resizing the component.

You can download it only from GitHub for now.

Re: foo_vis_spectrum_analyzer

Reply #348
Beta 4. Solid background applied (so no alpha background issues). No more foobar crashes so far.

The component itself stops working after a resize of the whole foobar window.

Also returning from component in fullscreen it does not return to original dimensions but uses the whole parent panel. Only upon trackchange it uses the dimensions I defined for it.

I made a small video (with background none) showing the behavior on changing tracks or background, fullscreen mode and back, minimizing and restoring (enabled all kinds of panels/plugins to show their behavior), and crashing of the component after a window resize (only 0.4 does this).



Re: foo_vis_spectrum_analyzer

Reply #349
Beta 4. Solid background applied (so no alpha background issues). No more foobar crashes so far.
I think I'm going back to the previous render code. There's too much going wrong and I don't have the setup to properly test the transparent background. It's not worth the effort at this point, IMHO.