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

Re: foo_vis_spectrum_analyzer

Reply #350
(v0.7.0.0-beta-4)
Is it possible to fix this artifact on the right and bottom borders when resizing the component's window?

Re: foo_vis_spectrum_analyzer

Reply #351
(v0.7.0.0-beta-4)
Is it possible to fix this artifact on the right and bottom borders when resizing the component's window?
I'll try but it's a result of the rendering code being in a separate thread. The background gets repainted asynchronously from the sizing.

Re: foo_vis_spectrum_analyzer

Reply #352
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.

Too bad. It kinda looks cool when it's working. Only thing missing is a solid redraw response to de-minimizing.

Edit: I tried to find a workaround to enforce repaint but so far no success. I have no way of detecting that foobar is minimized or just restored from being minimized. Splitter code just halts all execution when being minimized. And there's not something like a time function I can set as a timer to detect gaps because of prior minimization. Only can use something based on a playing track but not on a paused track. So the alternative is to send a request for repaint every second, which looks like shit everywhere  else in the skin.

Re: foo_vis_spectrum_analyzer

Reply #353
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.

Too bad. It kinda looks cool when it's working. Only thing missing is a solid redraw response to de-minimizing.

Edit: I tried to find a workaround to enforce repaint but so far no success. I have no way of detecting that foobar is minimized or just restored from being minimized. Splitter code just halts all execution when being minimized. And there's not something like a time function I can set as a timer to detect gaps because of prior minimization. Only can use something based on a playing track but not on a paused track. So the alternative is to send a request for repaint every second, which looks like shit everywhere  else in the skin.
I'm not giving up but I need time to do more research and do some offline experiments. The interaction between classic Windows and DirectX has always been 'complicated' and since MS has its focus on the managed world there are no recent articles or developments, that I know of.

Re: foo_vis_spectrum_analyzer

Reply #354
Thank you for your hard work on this plugin, so far the best one for foobar2000 v2 :)

I've configured the refresh rate limit to 20 Hz or 60 Hz (my screen refresh rate) but the bars animation looks not so smooth. I wonder if it's possible to improve the up/down movements of the bars, maybe by synchronizing them with the display.

I've found a super-smooth spectrum bars animation but it's in javascript, maybe you can find some ideas in it:
https://github.com/hvianna/audioMotion-analyzer/tree/master

Re: foo_vis_spectrum_analyzer

Reply #355
I've configured the refresh rate limit to 20 Hz or 60 Hz (my screen refresh rate) but the bars animation looks not so smooth. I wonder if it's possible to improve the up/down movements of the bars, maybe by synchronizing them with the display.
I've found that keeping version 0.600 and using a 60Hz refresh rate result in very smooth yet accurately responsive bar movement when paired with the settings below.  For whatever reasons I got too much jitter on release versions above that with identical or modified settings:



Re: foo_vis_spectrum_analyzer

Reply #356
Yeah, i noticed that too.

There was a change in v0.6.0.2, i believe it was:
Fixed: Finally found a (the?) correct way to use the sample window duration of foobar2000.

IMO, this resulted in a visual downgrade, it looked really smooth before that. It would be great having the option to use the old behavior.

Anyway, thanks for this amazing component.
| QAAC ~ 192 kbps |

 

Re: foo_vis_spectrum_analyzer

Reply #357
Thank you for your hard work on this plugin, so far the best one for foobar2000 v2 :)

I've configured the refresh rate limit to 20 Hz or 60 Hz (my screen refresh rate) but the bars animation looks not so smooth. I wonder if it's possible to improve the up/down movements of the bars, maybe by synchronizing them with the display.

I've found a super-smooth spectrum bars animation but it's in javascript, maybe you can find some ideas in it:
https://github.com/hvianna/audioMotion-analyzer/tree/master
Use Average mode smoothing. That normally makes the display less jumpy. The animation rate is high enough but the underlying result are what they are. Smoothing tempers the excess values.

Re: foo_vis_spectrum_analyzer

Reply #358
Yeah, i noticed that too.

There was a change in v0.6.0.2, i believe it was:
Fixed: Finally found a (the?) correct way to use the sample window duration of foobar2000.

IMO, this resulted in a visual downgrade, it looked really smooth before that. It would be great having the option to use the old behavior.

Anyway, thanks for this amazing component.
That fix had no impact on the 'smoothness'. It fixed the intake of samples for the FFT to be more in line with other analyzers.  Like @sveakul says, a lot of math parameters are exposed (thx, @TF3RDL ) so that you tweak the result to your liking but it takes some work.

Re: foo_vis_spectrum_analyzer

Reply #359
Thank you for your hard work on this plugin, so far the best one for foobar2000 v2 :)

I've configured the refresh rate limit to 20 Hz or 60 Hz (my screen refresh rate) but the bars animation looks not so smooth. I wonder if it's possible to improve the up/down movements of the bars, maybe by synchronizing them with the display.

I've found a super-smooth spectrum bars animation but it's in javascript, maybe you can find some ideas in it:
https://github.com/hvianna/audioMotion-analyzer/tree/master
Use Average mode smoothing. That normally makes the display less jumpy. The animation rate is high enough but the underlying result are what they are. Smoothing tempers the excess values.

Yes it's perfect now, thank you

Re: foo_vis_spectrum_analyzer

Reply #360
Thank you for your hard work on this plugin, so far the best one for foobar2000 v2 :)

I've configured the refresh rate limit to 20 Hz or 60 Hz (my screen refresh rate) but the bars animation looks not so smooth. I wonder if it's possible to improve the up/down movements of the bars, maybe by synchronizing them with the display.

I've found a super-smooth spectrum bars animation but it's in javascript, maybe you can find some ideas in it:
https://github.com/hvianna/audioMotion-analyzer/tree/master
Use Average mode smoothing. That normally makes the display less jumpy. The animation rate is high enough but the underlying result are what they are. Smoothing tempers the excess values.
But does the original foo_musical_spectrum (which don't have some sort of time smoothing), audioMotion-analyzer and even my own spectrum analyzer (with smoothing time constant on both of them set to zero, which disables it completely) exhibits the same "flickering" behavior at 60fps and above, especially with FFT size less than 4096 samples?

Re: foo_vis_spectrum_analyzer

Reply #361
for some reason upon update of this component, it crashes fb2k. The last change I remember making before updating it was changing the fft color range to custom, but I'm unable to find the config file to delete it so I can recover it... Help?

Re: foo_vis_spectrum_analyzer

Reply #362
Not tested but try this:

Download the latest stable version of the component and save it somewhere. Don't install it yet.

Browse your fb2k profile folder\user-components (append x64 if 64bit) and remove the foo_vis_spectrum_analyzer folder manually

Start fb2k and...

if using DUI, you should see blank spot in your layout where the component once was. fb2k will be clinging on to the old config should you restore the component which you don't want. So to wipe it, click in the blank space and add any other UI element. Now the bad config is gone and you can re-install the component and start again.

if using CUI, open File>Preferences>Display>Columns UI>Layout. One panel will be labelled <unknown>. Remove that and then re-install the component and start again.

Re: foo_vis_spectrum_analyzer

Reply #363
Not tested but try this:

Download the latest stable version of the component and save it somewhere. Don't install it yet.

Browse your fb2k profile folder\user-components (append x64 if 64bit) and remove the foo_vis_spectrum_analyzer folder manually

Start fb2k and...

if using DUI, you should see blank spot in your layout where the component once was. fb2k will be clinging on to the old config should you restore the component which you don't want. So to wipe it, click in the blank space and add any other UI element. Now the bad config is gone and you can re-install the component and start again.

if using CUI, open File>Preferences>Display>Columns UI>Layout. One panel will be labelled <unknown>. Remove that and then re-install the component and start again.

Thanks, that worked  :))

Re: foo_vis_spectrum_analyzer

Reply #364
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.

Thanks for that! 8)  I only just found time to check it out... I must say it looks really great with artist pictures, although that was not my initial plan... I was actually hoping it could be an "always-on" background, not just when playing but after stopping as well, right from initialization of the panel. See my idea was similar to what Defender was after, but instead of pseudo transparency, just using an image for background.

Perhaps to streamline you could check if there were title-formatting in the path, and if not the image only need be drawn once on start-up with no need to refresh per-track? (I also noticed that if I closed and re-opened the visualization while playing, the image was not drawn, so I presume making it always drawn on start-up would also fix that).

Honestly though I might have to change my plan, seeing the whole foobar background change to another artist is pretty cool! (Edit: the visualization is neat too) :D

Cheers

Re: foo_vis_spectrum_analyzer

Reply #365
BTW, implementing something like analog-style analyzer mode would require a different way of using get_chunk_absolute() from ones used by both FFT and current Goertzel-based CQT/VQT mode; the previous time is used as time offset and the requested chunk length is equals to a difference between current and previous time
Something like this:
Code: [Select]
// can also be used in Peak/RMS meters for accuracy (to not miss peaks especially with very low framerate like 10FPS) and consistency with VST analyzer plugins especially the RMS/VU meter
if (_VisualisationStream->get_chunk_absolute(Chunk, PrevPlaybackTime, PlaybackTime - PrevPlaybackTime)) {
  ProcessAudioChunk(Chunk);
}
PrevPlaybackTime = PlaybackTime; // where PrevPlaybackTime variable is initialized to 0 upon starting up the instance of it, starts the song, or upon seek, which all coefficients of sDFT and analog-style spectrum analyzer are reset to zero every time either of these happens
instead of:
Code: [Select]
if (_VisualisationStream->get_chunk_absolute(Chunk, PlaybackTime - WindowSize * (ReactionAlignment/2.0+0.5), WindowSize)) {
  ProcessAudioChunk(Chunk)
}
which is used for all other audio analysis algorithms and it continues to use that sample acquisition method when a new method that requires a contiguous stream of data is added

And also for @pqyt (the dev), I think that if the sliding DFT-based CQT/VQT is added, the Goertzel-based direct calculation of constant-Q transform method shouldn't be removed and instead, mark them as something like "legacy" or more accurately "slow" since Goertzel algorithm is really inefficient performance-wise with large number of bands

BTW, the FFT library that this visualization component using is this one optimized for clarity not performance, so to improve performance (especially with non-power of two sizes, which I think it is needed to switch to faster FFT libraries if the default FFT size is a non-power of two value, especially when the window size is in milliseconds rather than samples), you're need to switch the FFT library from Project Nayuki to PFFFT (the very same library used by Web Audio API AnalyserNode implementation in Chromium-based browsers, albeit modified to support double-precision floats for the sake of consistency with original JS implementation on CodePen) right?

Re: foo_vis_spectrum_analyzer

Reply #366
My I ask for a feature ?
In some Spectrum Analyzers there is an option to center the spectrum (in foo_uie_vis_channel_spectrum for example). I guess it's something like that:

20 kHz --------------- 20 Hz ------------ 20 kHz
           LEFT Channel              RIGHT Channel

I don't see this option, is it possible to implement it ?

Re: foo_vis_spectrum_analyzer

Reply #367
My I ask for a feature ?
In some Spectrum Analyzers there is an option to center the spectrum (in foo_uie_vis_channel_spectrum for example). I guess it's something like that:

20 kHz --------------- 20 Hz ------------ 20 kHz
           LEFT Channel              RIGHT Channel

I don't see this option, is it possible to implement it ?
for @pqyt actually, this is possible by indirectly translating the JS re-implementation of channel spectrum visualization to C++ for use with foo_vis_spectrum_analyzer as a new feature but make sure that it works well with another feature to set channels we want to visualize

Also, I'm not alone with a feature request to add Channel Spectrum panel-esque visualization

Re: foo_vis_spectrum_analyzer

Reply #368

Also, I'm not alone with a feature request to add Channel Spectrum panel-esque visualization

Of course I also second that as well.
Although I will only be able to use this plugin if the pseudo/alpha thingy is solved. Which in my opinion only seems to be one redraw upon de-minimize away.

Re: foo_vis_spectrum_analyzer

Reply #369
BTW, I implemented the two other types of dynamic gradient than intensity-based (where the brightness of the bars are higher when band's amplitude is higher and vice versa) and frequency-based (rainbow gradient where colors corresponds to musical notes similar to ColorChord and it adjust itself depending on the frequency scale used) one into my own audio spectrum project, which original foo_musical_spectrum (except the frequency-based and dB-based/Audition-style gradient of course, exclusive to my own spectrum analyzer) already have and I would appreciate if this is added into foo_vis_spectrum_analyzer

Re: foo_vis_spectrum_analyzer

Reply #370
I'll look at it later. There's some heavy re-engineering going right now to implement a new feature that is taking longer than I planned.

Re: foo_vis_spectrum_analyzer

Reply #371
See showcwt filter in FFmpeg, supports both spectrum and spectrogram display also many frequency scales: linear, log, mel, bark, erbs, etc (it can support any frequency scale actually), all with RDFT so its really fast, I tried sliding DFT approach with goertzel (in another filter implementation) but that one is much (unusable) slower with bigger frame-rate and video dimensions. My additional goal is to extend showcwt filter with synchrosqueezing transform - which give even better frequency vs time resolution.
Please remove my account from this forum.

Re: foo_vis_spectrum_analyzer

Reply #372
v0.7.0.0-rc-1, 2024-02-07

* New: Styles. Moved all the fragmented visual parameters (color, opacity thickness) into one unified style system.
    * Upon first use the old settings are converted to styles and sensible defaults are set for the new features.
    * The "Draw Band Background" option has been removed. It has been replaced by the color source of the dark and light band color.
    * The "Artwork & Dominant Color" background mode has been removed. It has been replaced by the Dominant Color source.
* New: The background and curve peak line and area can be styled.
* Changed: X-axis mode 'Octaves' shows only 'C' notes; Mode 'Notes' shows all notes.
* Improved: Minor performance optimizations due to styles.
* Improved: Optimized the calculation of the Curve visual.
* Fixed (Beta 4 regression): Removed the DirectComposition code that enabled transparent child windows. It was fun while it lasted.

You can download it only from GitHub for now.


Re: foo_vis_spectrum_analyzer

Reply #373
v0.7.0.0-rc-1, 2024-02-07
[...]
* Fixed (Beta 4 regression): Removed the DirectComposition code that enabled transparent child windows. It was fun while it lasted.
[...]

Fixed (Beta 4 regression) ? No, just removed. So plugin now it looks quite ugly in my skin.

Still decided to test a bit. Returning from full screen 0.7.0.0-rc1 doesn't show the working plugin anymore. See video ...



MOD edit: Removed excessive quoting

Re: foo_vis_spectrum_analyzer

Reply #374
v0.7.0.0-rc-1, 2024-02-07
[...]
* Fixed (Beta 4 regression): Removed the DirectComposition code that enabled transparent child windows. It was fun while it lasted.
[...].

Fixed (Beta 4 regression) ? No, just removed. So plugin now it looks quite ugly in my skin.
The crash was fixed. That was a regression.




MOD edit: Removed excessive quoting