HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: pqyt on 2023-11-12 09:42:35

Title: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-12 09:42:35
foo_vis_spectrum_analyzer is a foobar2000 component that implements a spectrum analyzer panel.

It is an attempt to recreate the foo_musical_spectrum (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Musical_Spectrum_(foo_musical_spectrum)) component by fismineur for foobar2000 64-bit.

Available in  the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository.
Title: Re: foo_vis_spectrum_analyzer
Post by: itisljar on 2023-11-12 10:25:00
Thank you for your work!

And now, bugs:

- The "pins" (I don't know how are these called in english, sorry) go to negative value (https://imgur.com/a/sX5Xx7p).
- Animation is jittery
- No settings at all!

Wishes:

- Please add frequency range to be an option
- Please add possibility to set up range showing (for example -30 to 0 dB)
- Please add possibility to set color scheme

Title: Re: foo_vis_spectrum_analyzer
Post by: Sergey77 on 2023-11-12 12:48:52
@pqyt,
Nice to see the start of new component!
Good luck, and new releases!
Title: Re: foo_vis_spectrum_analyzer
Post by: grimes on 2023-11-12 14:30:43
Its for DUI, not CUI.
Title: Re: foo_vis_spectrum_analyzer
Post by: TF3RDL on 2023-11-12 17:59:18
Glad to see @pqyt remaking Musical Spectrum (foo_musical_spectrum) for foobar2000 x64 (as an early-access component right now) and the very first step of making my concept components like FFT Analyzer (foo_fft_analyzer) (https://hydrogenaud.io/index.php/topic,124330.0.html) into reality, and it is based on my own spectrum analyzer (https://codepen.io/TF3RDL/pen/poQJwRW) on CodePen

Of course, since this component uses custom FFT just like foo_enhanced_spectrum_analyzer (https://hydrogenaud.io/index.php/topic,115912.0.html), a non-power of two FFT size and the feature to set FFT size in milliseconds (where the FFT size adjusts itself according to the sample rate so it get 100ms response time and 10Hz resolution at all sampling rates like 4410 samples for 44.1kHz samplerate, 4800 samples for 48kHz samplerate, and so on) instead of samples would be nice to have

A Columns UI support as well as UI color integration like Enhanced Spectrum analyzer (to look more like fb2k's built-in spectrum) would be nice, and I would appreciate if @pqyt adds the option to display separate channels simultaneously like this one (https://codepen.io/TF3RDL/pen/VwENJbB) and Mid/Side representations
Title: Re: foo_vis_spectrum_analyzer
Post by: Jackal29a on 2023-11-13 09:18:00
Thank you very much PQYT!!
It is great to see this in 64bit

I'll add to the wish list, if at all possible, a config window like old plugin had:

(https://i.imgur.com/VHcR4ah.png)

Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-13 11:54:47
Its for DUI, not CUI.
A quick first attempt to add DUI support to a CUI component caused a massive amount of compilation errors.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-13 12:07:18
I'll add to the wish list, if at all possible, a config window like old plugin had:
A configuration dialog will follow (in fact the next version already has an empty one) but that takes a lot of work. I'm experimenting with a JSON file that contains the configuration until then.
Title: Re: foo_vis_spectrum_analyzer
Post by: wojak on 2023-11-13 17:09:49
Hi,
this component does not work for me.
FB2.0, 64bit, Win10.
The component installs ok (tried both versions) but when I play audio and click view-visualisations-spectrum analyser I just get a black window with nothing inside.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-13 20:33:52
Hi,
this component does not work for me.
FB2.0, 64bit, Win10.
The component installs ok (tried both versions) but when I play audio and click view-visualisations-spectrum analyser I just get a black window with nothing inside.
Have you started playing a track? The display 'in rest' is still a black background.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-13 20:38:07
I just released a new version to the Components repository. Foobar2000 should detect the new version automatically.

Some parameters of the configuration can be specified by editing the JSON file that is in the same directory as the component (foo_vis_spectrum_analyzer.json) until I have time to create a user interface. I'll document them in the wiki (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Spectrum_Analyzer_(foo_vis_spectrum_analyzer)).
Title: Re: foo_vis_spectrum_analyzer
Post by: wojak on 2023-11-13 20:58:46
Hi,
this component does not work for me.
FB2.0, 64bit, Win10.
The component installs ok (tried both versions) but when I play audio and click view-visualisations-spectrum analyser I just get a black window with nothing inside.
Have you started playing a track? The display 'in rest' is still a black background.

Yes, as I have written "when I play audio". I know that when idle, there is nothing to be displayed. But this component just does not display anything for me. Just blank window.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-13 21:12:34
Yes, as I have written "when I play audio". I know that when idle, there is nothing to be displayed. But this component just does not display anything for me. Just blank window.
This is a very early alpha release which contains no logging or diagnostics code. At this stage I'm unable to help you,
Title: Re: foo_vis_spectrum_analyzer
Post by: TF3RDL on 2023-11-13 21:40:16
This is a very early alpha release which contains no logging or diagnostics code. At this stage I'm unable to help you,
Agreed with your statement about the component's state, that's why I put the yellow-colored warning on top of the the wiki page about this component (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Spectrum_Analyzer_(foo_vis_spectrum_analyzer)) that says that this component is in, you guess it, Early Access (pre-alpha), as it is subject to changes and obviously might not reflect the final release

Also, the FR for this component: LED effects as in audioMotion-analyzer (https://github.com/hvianna/audioMotion-analyzer)
Title: Re: foo_vis_spectrum_analyzer
Post by: wojak on 2023-11-14 16:07:38
Just installed the third version on this component. Still just blank black window. All other visualisations and meters work properly.
Title: Re: foo_vis_spectrum_analyzer
Post by: grimes on 2023-11-14 16:27:44
Does this component overwrite the old monochrome Spectrum Analyzer?

EDIT: Never mind, this Spectrum analyzer is part of CUI.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-14 17:44:07
Just installed the third version on this component. Still just blank black window. All other visualisations and meters work properly.
I'll see if I can add some logging to the console in the next version.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-14 22:27:27
v0.1.0.3, 2023-11-14

* New: Implemented the frequency bands of AveePlayer (https://aveeplayer.com/).
* New: Implemented the smoothing methods of the spectrum.
  * This addresses one of the early comments about the 'jitter' in the rendering. F.e. use "SmoothingMethod: 1" and "SmoothingFactor: 0.75"
* New: Added some DirectX debug logging to the console. Set the "LogLevel" parameter to 1 to enable; Use 6 (default) to disable.
Title: Re: foo_vis_spectrum_analyzer
Post by: TF3RDL on 2023-11-15 00:21:23
Of course, a config window could be easier to use than having to editing the JSON files (which currently is the only way to customize that) and it should allow different instances of this component to have its own configs as usual with built-in visualizations, Channel Spectrum panel, Musical Spectrum, and even Enhanced Spectrum analyzer, etc.

Also, could the FFT size on this component be set to non-power of 2 values like 4800 samples (100ms at 48kHz sampling rate)?
v0.1.0.3, 2023-11-14

* New: Implemented the frequency bands of AveePlayer (https://aveeplayer.com/).
Probably an exact replica of frequency scaling function from Avee Player (which is an Android audio player app best known for music visualizations on these Indonesian remixes of popular TikTok songs on YouTube) for this frequency band distribution mode, despite this Android app is paid and closed-source anyway

* New: Implemented the smoothing methods of the spectrum.
  * This addresses one of the early comments about the 'jitter' in the rendering. F.e. use "SmoothingMethod: 1" and "SmoothingFactor: 0.75"
That's right, this is a peak decay/smoothing time constant function that smooths out this visualization, which is missing in the original foo_musical_spectrum but present in Enhanced Spectrum analyzer (foo_enhanced_spectrum_analyzer) barring from the exponential averaging mode

BTW, should @pqyt collaborate with hvianna (https://github.com/hvianna) (the developer of audioMotion-analyzer (https://github.com/hvianna/audioMotion-analyzer), which does the similar thing to foo_musical_spectrum and just like this component, it has features that foo_musical_spectrum don't have like 1/24th octave bands and separate channels display) once the source code is released?
Title: Re: foo_vis_spectrum_analyzer
Post by: wojak on 2023-11-16 07:48:02
v0.1.0.3, 2023-11-14

* New: Implemented the frequency bands of AveePlayer (https://aveeplayer.com/).
* New: Implemented the smoothing methods of the spectrum.
  * This addresses one of the early comments about the 'jitter' in the rendering. F.e. use "SmoothingMethod: 1" and "SmoothingFactor: 0.75"
* New: Added some DirectX debug logging to the console. Set the "LogLevel" parameter to 1 to enable; Use 6 (default) to disable.

Still blank window for me. Am I the only one who can't properly run this component? All other components work fine for me.
Title: Re: foo_vis_spectrum_analyzer
Post by: darkflame23 on 2023-11-16 08:48:29
Blank for me too, this and the last version. Latest FB2K release version, Win 11 Pro, everything at 96kHz.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-16 12:38:38
Blank for me too, this and the last version. Latest FB2K release version, Win 11 Pro, everything at 96kHz.
Have you looked for "foo_vis_spectrum_analyzer:" messages in the console?

The drawing code uses DirectX but since you get a black background, which is already rendered using DirectX, it may be something else. I have one generated wav file at 96kHz that has no problems on my system.

The next version will show the axis and a frame counter without playing a track. That will help narrow down where things go wrong.

Thank you all for your patience. I know some of you are alpha testers.
Title: Re: foo_vis_spectrum_analyzer
Post by: darkflame23 on 2023-11-16 14:33:44
No worries! Yeah, looked in the Console, nothing there regarding your component.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-16 21:19:56
v0.1.0.4, 2023-11-16

* New: Implemented color schemes.
* New: Implemented the peak value indicators.
* Improved: Replaced the FFT with one that supports complex values and non-radix-2 FFT sizes.
* Improved: Improved and refactored rendering code.
* Added some more diagnostics code.
  * LogLevel 0 will write messages to the console everytime an audio chunk and the spectrum gets rendered.

Please check the wiki (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Spectrum_Analyzer_(foo_vis_spectrum_analyzer)) for an explanation about the parameters.
Title: Re: foo_vis_spectrum_analyzer
Post by: servimo on 2023-11-17 12:49:32
Thanks for this needed component
Title: Re: foo_vis_spectrum_analyzer
Post by: grimes on 2023-11-17 13:03:46
Color: only Solid works (blue).

Edit: Everything in the Configuration works only in the default settings.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-17 13:37:29
Color: only Solid works (blue).

Edit: Everything in the Configuration works only in the default settings.
I assume the file is named correctly (foo_vis_spectrum_analyzer.json), is in the correct location (same directory as the component DLL) and is in plain ASCII (no Unicode, UTF-8) and does not have a BOM?

I have attached the file I'm currently using during development.
Title: Re: foo_vis_spectrum_analyzer
Post by: grimes on 2023-11-17 13:46:28
json file was missing.

With your json file:
* Linear
* 4096
* Bands
* Decibel
* Prism 1
* Gravity

I'm still not able to change this settings in configuration window.
Title: Re: foo_vis_spectrum_analyzer
Post by: wojak on 2023-11-17 15:31:26
v0.1.0.4, 2023-11-16

* New: Implemented color schemes.
* New: Implemented the peak value indicators.
* Improved: Replaced the FFT with one that supports complex values and non-radix-2 FFT sizes.
* Improved: Improved and refactored rendering code.
* Added some more diagnostics code.
  * LogLevel 0 will write messages to the console everytime an audio chunk and the spectrum gets rendered.

Please check the wiki (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Spectrum_Analyzer_(foo_vis_spectrum_analyzer)) for an explanation about the parameters.

With this version I have a blank window with horizontal and vertical lines (grids) and dB values on the left. Still no "content" (while playing audio files).
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-17 17:04:35
With this version I have a blank window with horizontal and vertical lines (grids) and dB values on the left. Still no "content" (while playing audio files).

Thx. At least the rendering code works. What happens if you set the log level to 0 (Trace)?

The following messages can appear in the console:

- Unable to create visualisation stream.
- Visualisation stream is invalid.
- Rendering chunk { ChannelCount: %d, SampleRate: %d }.
- Rendering %d bands.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-17 17:06:26
I'm still not able to change this settings in configuration window.
The configuration dialog is a mock-up. I should have hidden it. If I have time enough over the weekend I'll create a working version.
Title: Re: foo_vis_spectrum_analyzer
Post by: wojak on 2023-11-17 18:16:53
With this version I have a blank window with horizontal and vertical lines (grids) and dB values on the left. Still no "content" (while playing audio files).

Thx. At least the rendering code works. What happens if you set the log level to 0 (Trace)?

The following messages can appear in the console:

- Unable to create visualisation stream.
- Visualisation stream is invalid.
- Rendering chunk { ChannelCount: %d, SampleRate: %d }.
- Rendering %d bands.

If you mean the last position in the advanced settings, changing the digit from 3 to 0 does nothing. The console does not show any info when starting or closing your component.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-17 18:51:53
If you mean the last position in the advanced settings, changing the digit from 3 to 0 does nothing. The console does not show any info when starting or closing your component.

That should not be possible...
Title: Re: foo_vis_spectrum_analyzer
Post by: wojak on 2023-11-17 19:35:34
If you mean the last position in the advanced settings, changing the digit from 3 to 0 does nothing. The console does not show any info when starting or closing your component.

That should not be possible...
I open the console, there is info about starting foobar, some components (like foo youtube),ffpeg and so on. then when I start playing audio ther is message about  opening the track, some new info (never seen it in older versions) about channel mapping (if I remember correctly remap=N). When I start your component...there is nothing new in the console, no matter if the trace is set to 3 or 0. When I close your component there is also no new info in the console.
Title: Re: foo_vis_spectrum_analyzer
Post by: korth on 2023-11-17 20:59:51
I've noticed that the installation each new version deletes the existing json file.
If the default LogLevel: is 6 (no logging) then (I assume) there isn't anything in the Console unless a new json file is added/created.
I added the json file provided in Reply #26 (https://hydrogenaud.io/index.php?msg=1035268) instead of creating a new one (again).
LogLevel: 0 returns repeating lines such as
Code: [Select]
foo_vis_spectrum_analyzer: Rendering chunk { ChannelCount: 2, SampleRate: 44100 }.
foo_vis_spectrum_analyzer: Rendering 160 bands.
All other LogLevel settings return nothing.

Previously LogLevel: 1 returned
Code: [Select]
foo_vis_spectrum_analyzer: RenderTarget: { Width: 661, Height: 409 }
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-17 23:30:33
I've noticed that the installation each new version deletes the existing json file.
Looks like default behavior of the fb2k install procedure. The component does not contain a JSON file.
Title: Re: foo_vis_spectrum_analyzer
Post by: sveakul on 2023-11-18 01:38:04
pqyt:  0.1.0.4 looking great even in alpha stage, thanks for the work on this!  FYI, am using your posted json, noticed that PeakMode=0 does not turn off peaks.  Looking forward to a fully functional GUI control panel.  Foobar v2.1 x64 2023-11-09 preview.
Title: Re: foo_vis_spectrum_analyzer
Post by: TF3RDL on 2023-11-18 01:56:58
Looking forward to a fully functional GUI control panel.
@pqyt This should allow different instances of this component have its own settings right?

Also, FR for this component: port my other spectrum visualizations like this (https://codepen.io/TF3RDL/pen/NWBYeaE) (Channel Spectrum panel (https://wiki.hydrogenaud.io/index.php?title=foobar2000:Components/Channel_Spectrum_panel_(foo_uie_vis_channel_spectrum)) remake) and another (https://codepen.io/TF3RDL/pen/VwENJbB) (Mid/Side spectrum analyzer and combined spectrum/spectrogram visualization) into a one component like this (after the working GUI is there and this component is nearly getting out of the alpha stage):
X
and this:
X
X

BTW, I hope this new Musical Spectrum remake doesn't get into the list of known problematic components list (which means I can't recommend this to someone else if it is listed as problematic/glitchy)
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-18 08:21:18
@pqyt This should allow different instances of this component have its own settings right?
What's the use case for this?
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-18 08:22:40
BTW, I hope this new Musical Spectrum remake doesn't get into the list of known problematic components list (which means I can't recommend this to someone else if it is listed as problematic/glitchy)
You sure know how to motivate someone...
Title: Re: foo_vis_spectrum_analyzer
Post by: Defender on 2023-11-18 10:24:03
@pqyt This should allow different instances of this component have its own settings right?
What's the use case for this?

To be able to use this plugin in possible different spots in your skin at the same time with different layout. I personally do this a lot with foo_uie_vis_peakmeter_spectrum, foo_vis_vumeter and foo_uie_vis_channel_spectrum.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-18 10:38:30
@pqyt This should allow different instances of this component have its own settings right?
What's the use case for this?

To be able to use this plugin in possible different spots in your skin at the same time with different layout. I personally do this a lot with foo_uie_vis_peakmeter_spectrum, foo_vis_vumeter and foo_uie_vis_channel_spectrum.
And how do you select which settings to use? Some kind of saveable preset mechanism?
Title: Re: foo_vis_spectrum_analyzer
Post by: marc2k3 on 2023-11-18 10:50:24
And how do you select which settings to use? Some kind of saveable preset mechanism?

No. That could be extra functionality added on top but per instance data is saved by fb2k in your theme.fth. Instead of using cfg_var and friends, you'd use set_configuration and get_configuration from ui_element_instance.

edit: a random fun fact, default UI elements don't need a preset import/export because copying a UI element to the clipboard in layout editing mode can be pasted as a standalone .fth file in Windows Explorer. They can then be copied/pasted back anywhere else.
Title: Re: foo_vis_spectrum_analyzer
Post by: Defender on 2023-11-18 10:55:40
@pqyt This should allow different instances of this component have its own settings right?
What's the use case for this?

To be able to use this plugin in possible different spots in your skin at the same time with different layout. I personally do this a lot with foo_uie_vis_peakmeter_spectrum, foo_vis_vumeter and foo_uie_vis_channel_spectrum.
And how do you select which settings to use? Some kind of saveable preset mechanism?

I don't know exactly where it is stored. These old plugins do not generate their own cfg file in configuration, so my guess is that the info is stored in foo_ui_columns.dll.cfg.

The different instances of these plugins however do accept exporting and importing settings by using configfiles.
In case of channel spectrum it's a something.csp file and in case of foo_uie_vis_peakmeter_spectrum it's a something.pmf file.
I for instance use different settings for 2ch, 6ch and 8ch.

Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-18 18:46:15
No. That could be extra functionality added on top but per instance data is saved by fb2k in your theme.fth. Instead of using cfg_var and friends, you'd use set_configuration and get_configuration from ui_element_instance.
Found it and using it. I haven't tested multiple instances yet but it should work. Thx for the hint.
Title: Re: foo_vis_spectrum_analyzer
Post by: sveakul on 2023-11-18 19:04:34
BTW, I hope this new Musical Spectrum remake doesn't get into the list of known problematic components list (which means I can't recommend this to someone else if it is listed as problematic/glitchy)
You sure know how to motivate someone...
I thought the same thing.  Another classic: "Also, the @pqyt remake of Musical Spectrum (with help from me, of course because you're not an audio engineer at all) " (https://hydrogenaud.io/index.php/topic,123956.msg1035113.html#msg1035113 (https://hydrogenaud.io/index.php/topic,123956.msg1035113.html#msg1035113)).
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-18 21:20:50
v0.2.0.0, 2023-11-18

* New: Implemented a configuration dialog.
* New: Implemented logarithmic Y axis.
* New: Experimental "Fade-Out" mode for the peak indicators.

You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository.

The configuration dialog is not pretty to look at, has a lot of rough edges and is not user-friendly but it works. Use it to play with but except things to change (and hopefully improve).
The JSON file will be ignored from now on, possibly later to be re-used for loading and saving presets.
Title: Re: foo_vis_spectrum_analyzer
Post by: TF3RDL on 2023-11-19 04:54:53
* New: Implemented logarithmic Y axis.
What I meant by new Y axis mode is the linear/nth root Y-axis/amplitude scale (while the Y-axis labels are still in dB unit unlike in audioMotion-analyzer (https://github.com/hvianna/audioMotion-analyzer)) right?

The configuration dialog is not pretty to look at, has a lot of rough edges and is not user-friendly but it works. Use it to play with but except things to change (and hopefully improve).
Great to have the configuration dialog (and hopefully the FFT size can still be set to non-power of 2 values, but I would expect that non-power of 2 FFT sizes have higher CPU use than power of 2 FFTs) added but I expect that the config window would be completely different (more options and being user-friendly) from current one over time this component is updated significantly

Of course, a fully-customizable color scheme (replacing the current pre-built color scheme options but I would appreciate if the color schemes can be imported/exported) would be a nice addition (since original foo_musical_spectrum and built-in spectrogram already have, except neither of them have customizable colorstop position like in audioMotion-analyzer and PowerPoint) to this Musical Spectrum remake as well as the gradient option named "foobar2000" should automatically use the current colors of UI of foobar2000 itself (like built-in visualizations and even Enhanced Spectrum analyzer do) and another named "foobar2000 Dark Mode" would be replaced with ones that automatically use the fb2k's current color scheme (except the bars and peaks color is a solid color, just like built-in oscilloscope visualization)

Also, a rainbow-colored bars like in ColorChord (https://github.com/cnlohr/colorchord) (a constant-Q spectrum analyzer/chromagram thing) would be appreciated like this:
X
And it changes when you use different frequency scale like Mel as the red color corresponds to A note:
X

The JSON file will be ignored from now on, possibly later to be re-used for loading and saving presets.
Interesting (because it would be useful to have JSON part re-used for import/export presets just like in original foo_musical_spectrum), and BTW, you could make this component load JSON on the same component folder to override the default preset when the user adds in new instances of this component as a UI element (existing instances of this component should continue to use its own settings, just the default preset is overridden)
Title: Re: foo_vis_spectrum_analyzer
Post by: wojak on 2023-11-19 10:00:28
v0.2.0.0, 2023-11-18

* New: Implemented a configuration dialog.
* New: Implemented logarithmic Y axis.
* New: Experimental "Fade-Out" mode for the peak indicators.

You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository.

The configuration dialog is not pretty to look at, has a lot of rough edges and is not user-friendly but it works. Use it to play with but except things to change (and hopefully improve).
The JSON file will be ignored from now on, possibly later to be re-used for loading and saving presets.


I managed to properly start the previous version yesterday - it only worked with json file. without it it was blank window. But when the json file and was present, the music started to stutter or make some crazy noises. When I removed this component, the music was ok. Today I installed the newest version and....blank window. So I put the json file in...and it started to work...but again music started to do strange pops, dropouts and noises. So again I removed the component. Now everything seems to be OK.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-19 12:47:40
So again I removed the component. Now everything seems to be OK.
The JSON file is not used anymore now that most settings can be specified with the configuration dialog. A visualizer does not (or at least should not) interfere with your audio stream so that's weird. See my private message to you, please.
Title: Re: foo_vis_spectrum_analyzer
Post by: sveakul on 2023-11-19 19:10:58
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!
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-19 19:45:12
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 (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Spectrum_Analyzer_(foo_vis_spectrum_analyzer)) 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.
Title: Re: foo_vis_spectrum_analyzer
Post by: sveakul on 2023-11-19 21:21:53
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:

(https://i.imgur.com/MqWOXvY.png)

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."
Title: Re: foo_vis_spectrum_analyzer
Post by: TF3RDL on 2023-11-19 21:24:10
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 (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Spectrum_Analyzer_(foo_vis_spectrum_analyzer)) 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 (https://codepen.io/TF3RDL/pen/poQJwRW) as fb2k component anyway):

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)
Title: Re: foo_vis_spectrum_analyzer
Post by: MG240 on 2023-11-19 21:57:14
Thank you very much. Great component.

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

Title: Re: foo_vis_spectrum_analyzer
Post by: sveakul on 2023-11-20 01:00:57
By a "pop-up window", do you mean foo_flowin?
Title: Re: foo_vis_spectrum_analyzer
Post by: Air KEN on 2023-11-20 01:44:29
@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.
Title: Re: foo_vis_spectrum_analyzer
Post by: MG240 on 2023-11-20 05:00:58
@sveakul @Air KEN

Yes, I'm referring to the Main Menu. "Menu > View > Visualizations > Spectrum Analyzer"
Title: Re: foo_vis_spectrum_analyzer
Post by: Air KEN on 2023-11-20 05:44:02
@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.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-20 07:28:20
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.
Title: Re: foo_vis_spectrum_analyzer
Post by: Jackal29a on 2023-11-20 07:35:12
New GUI is fantastic! many thanks
Could you please make V & H grid checkboxes so they can be shown/hidden independently?
Title: Re: foo_vis_spectrum_analyzer
Post by: Air KEN on 2023-11-20 09:13:42
@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.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-20 11:24:56
@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.
Title: Re: foo_vis_spectrum_analyzer
Post by: MG240 on 2023-11-20 17:44:39
@pqyt

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

X
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-20 19:40:48
Thanks a lot that's wonderful. Also, this is what I mean with the white border.
Fixed it.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-20 19:43:18
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 (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository.
Title: Re: foo_vis_spectrum_analyzer
Post by: sveakul on 2023-11-20 21:52:23
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?
Title: Re: foo_vis_spectrum_analyzer
Post by: TF3RDL on 2023-11-21 02:10:57
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 (https://hydrogenaud.io/index.php/topic,58494.msg580142.html#msg580142) @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 (https://www.zafarrafii.com/Documents/Journals/Rafii%20-%20Sliding%20Discrete%20Fourier%20Transform%20with%20Kernel%20Windowing%20-%202018.pdf) 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 (https://codepen.io/TF3RDL/pen/JjBzjeY) 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?
Title: Re: foo_vis_spectrum_analyzer
Post by: MG240 on 2023-11-21 05:11:39
@pqyt

Much appreciated. I've noticed the full screen mode is greyed out in the new release. Is it for the time being?
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-21 05:20:19
@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.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-21 05:23:45
* New: Implemented Mel scale mapping of the FFT coefficients.
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.
Title: Re: foo_vis_spectrum_analyzer
Post by: TF3RDL on 2023-11-21 18:58:35
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)
Title: Re: foo_vis_spectrum_analyzer
Post by: 2tec on 2023-11-21 19:40:58
Quote
I went with the Mel name because that's what I found articles about.

The Story of Mel, a Real Programmer (https://users.cs.utah.edu/~elb/folklore/mel.html)

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

Thanks for the component.
Title: Re: foo_vis_spectrum_analyzer
Post by: boxerfan88 on 2023-11-22 02:19:57
@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:

(https://i.ibb.co/D7LNPw6/2023-11-22-10-07-29-Spectrum-Analyzer-Configuration.png)

This is the spectrum display that I see:

(https://i.ibb.co/sqWn5Bb/2023-11-22-10-07-50-Spectrum-Analyzer.png)

I have the following issues:

Is there some configuration changes I need to make?

Title: Re: foo_vis_spectrum_analyzer
Post by: Air KEN on 2023-11-22 03:07:48
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

(https://i.imgur.com/FmBZsWX.png)
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-22 05:28:28
@pyqt -- Thank you for a very very nice component!
I am running 0.3.0.0 and I've observed some issues.
Are you running with high(er) DPI settings? While everything is designed to support it I haven't really tested that setup yet.
Title: Re: foo_vis_spectrum_analyzer
Post by: boxerfan88 on 2023-11-22 14:43:49
Two of my laptops are experiencing the same symptoms.
Is it a similar environment?

Are you running with high(er) DPI settings? While everything is designed to support it I haven't really tested that setup yet.

Ahh ... that (scaling/DPI) could be the cause. I run dual monitors.
The primary with 150% scaling. The secondary with 100% scaling.
foobar2000 runs on the secondary monitor.
I tested the spectrum analyzer window in both displays, it behaves the same.

(https://i.ibb.co/WBTpB6s/xxx.png)
Title: Re: foo_vis_spectrum_analyzer
Post by: boxerfan88 on 2023-11-22 14:49:54
I did an experiment -- i set both displays to 100% scaling; restarted foobar; playback music and display spectrum analyzer window.
I got the same behavior as I reported earlier ...
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-22 16:15:36
I'm not sure I reproduced your problem but something is still wrong:

- At a higher DPI when I change the axis mode, the axes adapt and redraw but the bands of the spectrum are unaware of the change.
- Overall the main interface and the dialog are blurry due to upscaling.

On it.
Title: Re: foo_vis_spectrum_analyzer
Post by: sveakul on 2023-11-22 21:16:09

  • the X axis frequency is not shown
  • the X axis seems to be cutoff at 3kHz -- the spectrum display should run until 40kHz
Same issue here with no frequency labelling of the X axis, and no apparent change when its mode is changed.  Seems to be cutting off the high end altogether as boxerfan88 notes.  My display is just a W10 125% scale and 1920 X 1080 resolution.
Title: Re: foo_vis_spectrum_analyzer
Post by: Air KEN on 2023-11-22 23:12:46
@pqyt

Reply #74: https://hydrogenaud.io/index.php/topic,125031.msg1035506.html#msg1035506

my laptop
Windowws 11
Display:
15.6
1920x1080
Scale:125%

This is a standard specification.
Title: Re: foo_vis_spectrum_analyzer
Post by: pqyt on 2023-11-23 05:56:13

    • the X axis frequency is not shown
    • the X axis seems to be cutoff at 3kHz -- the spectrum display should run until 40kHz
    Same issue here with no frequency labelling of the X axis, and no apparent change when its mode is changed.  Seems to be cutting off the high end altogether as boxerfan88 notes.  My display is just a W10 125% scale and 1920 X 1080 resolution..[/list]
    The X axis display issue is one thing.

    But could it be that there is some confusion about the settings? The X axis does not control the frequency range. That is done by the frequency settings: either a Hz range or a note range. The X labels just indicate what the possible content of each bin/bar is; what you put in each bin is specified by the Transform and Frequencies settings
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2023-11-23 06:27:12
    Yes, I understand this completely.  But the expectation is that by specifying a frequency range for the X-axis, the display would then show some progressive numerical values along that axis, starting with the lowest frequency specified for the range.  Just as the Y-axis now displays dB reading values through the the height of that axis according to what was specified.

    Not trying to annoy, just letting you know we are on the same page.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-11-23 08:26:44
    Not trying to annoy, just letting you know we are on the same page.
    Oh you're not annoying. I appreciate the feedback. Coding, liking writing, is a lonely job ;-) It's just hard to understand a bug report sometimes because a lot of times seemingly irrelevant context information does not get mentioned.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2023-11-25 00:16:40
    As for the new constant-Q transform mode, does this component exhibit performance issues/bad framerate (when using 1/24th octave or higher bands and large window size of 300ms max and above) in the same way as my own audio spectrum analyzer (https://codepen.io/TF3RDL/pen/poQJwRW)?

    As I haven't tested this @pqyt component yet as I'm waiting for this component to get out of the alpha stage (unless on certain situations), so I can't give estimates about the framerate for the CQT visualization and this question is for anyone curious on performance impacts on sliding DFT vs. Goertzel algorithm
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-11-26 16:08:17
    v0.4.0.0, 2023-11-26

    * New: Most colors and the custom color scheme can be modified in the configuration dialog.
    * Improved: Each instance of the component now has its own configuration. Note: The fullscreen version is a separate instance.
    * Improved: Added spin buttons to most numeric controls.
    * Changed: Mel scale mapping is now called Triangular Filter Bank scale mapping.

    You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository.

    You'll notice that the configuration dialog is becoming quite large and complex. Please report any quirks or crashes.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-11-26 18:45:22
    v0.4.0.0, 2023-11-26

    * New: Most colors and the custom color scheme can be modified in the configuration dialog.
    * Improved: Each instance of the component now has its own configuration. Note: The fullscreen version is a separate instance.
    * Improved: Added spin buttons to most numeric controls.
    * Changed: Mel scale mapping is now called Triangular Filter Bank scale mapping.

    You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository.

    You'll notice that the configuration dialog is becoming quite large and complex. Please report any quirks or crashes.

    Hi, thanks for this great component.
    Some issues I have:
    - still no labels on X axis (no digits nor letter, no Hz,no Notes)
    - because there are no labels (see above) I am not 100% sure but it seems that changing values (like Hz or notes range) has no effect on the display. Ex. I change frequency to 96kHz and play an mp3 file....and to my suprise I see moving bars right to the right end of the component window. How is that possible for mp3 to be able to "play" 96kHz? So either the bars show something different than they should or the changes do not take effect. As somebody has written earlier - it looks likje the display is cut at some low/mid frequency and does not show anything higher no matter what changes in the menu we make.
    Please make x axis values visible (just like Y axis and dB are) so we would know what we really see.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-11-26 20:57:04
    Some issues I have:
    - still no labels on X axis (no digits nor letter, no Hz,no Notes)
    - because there are no labels (see above) I am not 100% sure but it seems that changing values (like Hz or notes range) has no effect on the display. Ex. I change frequency to 96kHz and play an mp3 file....and to my suprise I see moving bars right to the right end of the component window. How is that possible for mp3 to be able to "play" 96kHz? So either the bars show something different than they should or the changes do not take effect. As somebody has written earlier - it looks likje the display is cut at some low/mid frequency and does not show anything higher no matter what changes in the menu we make.
    Please make x axis values visible (just like Y axis and dB are) so we would know what we really see.
    I'm afraid I don't have a clue what is wrong. This (and the previous version) has been tested on 3 different computers and 3 different versions of Windows, both x86 and x64. None of the systems behave like yours. The visual is nearly identical to the original foo_musical_spectrum component with the same settings.

    What happens when you embed the component in the main foobar2000 UI instead of using a separate window?

    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2023-11-26 23:10:22
    I'm afraid my experiences with 0.4.0.0 are the same as wojak--there is no visible X-axis labelling either by frequency or note.  This is using Foobar 2.1 x64 2023-11-22 preview, Windows x64 at 125% scale on a 1920X1080 display resolution.  The images attached here show what I am seeing, and what my settings are.  The plugin was added as a regular tabbed fixed UI element using Layout Editing Mode, like all my stuff is.

    A new "irritation" of this version is the inablity to change band no. or frequency range quickly by using the delete or backspace key in the setting boxes and typing the desired value--now you must use the small up/down arrow buttons for any change made.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2023-11-27 06:29:29
    Using different Windows DPI setting than 100% clips the contents of the window and things are only partially visible. At least here easily reproducible.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Air KEN on 2023-11-27 07:30:57
    Reply #80 https://hydrogenaud.io/index.php/topic,125031.msg1035547.html#msg1035547
    As mentioned here, this is the standard specification.

    Set again.
    Windowws 11
    Display:
    15.6
    1920x1080
    Scale:100%

    I was able to display it.
    X axis is OK. There is still a problem with the Y axis.
    Hmm, how do I use it?

    (https://i.imgur.com/F0NAnKo.png)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-11-27 08:13:28
    Using different Windows DPI setting than 100% clips the contents of the window and things are only partially visible. At least here easily reproducible.
    It's not here. I just switched one of my screens to 125%, created a new tab and added a new instance of the element. Perfect sizing from the start.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-11-27 08:24:03
    X axis is OK. There is still a problem with the Y axis.
    Hmm, how do I use it?
    Erhm... the Y-axis is right there in your screenshot. What do you mean by: "how do I use it?"
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Air KEN on 2023-11-27 08:55:03
    @pqyt

    For example, the top of the Y axis (-6db) cannot be displayed any further.
    Is it something like this?

    Scale:100%
    (https://i.imgur.com/F0NAnKo.png)        
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-11-27 09:21:53
    I'm afraid my experiences with 0.4.0.0 are the same as wojak--there is no visible X-axis labelling either by frequency or note.  This is using Foobar 2.1 x64 2023-11-22 preview, Windows x64 at 125% scale on a 1920X1080 display resolution.  The images attached here show what I am seeing, and what my settings are.  The plugin was added as a regular tabbed fixed UI element using Layout Editing Mode, like all my stuff is.

    A new "irritation" of this version is the inablity to change band no. or frequency range quickly by using the delete or backspace key in the setting boxes and typing the desired value--now you must use the small up/down arrow buttons for any change made.

    Yes,
    the inability to manually put desired values into boxes is a shortcoming for me too.
    Plus if we are abe to make the X-axis values visible, it would be nice to also have the ability to see the valuses directly on the bars (which is impossible for me now) - ex. if I put "notes" on the X-axis I would see the notes on the bottom and when going on the actual bars with the mouse I would see the frequencies corresponding with those notes.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2023-11-27 13:10:58
    Using different Windows DPI setting than 100% clips the contents of the window and things are only partially visible. At least here easily reproducible.
    It's not here. I just switched one of my screens to 125%, created a new tab and added a new instance of the element. Perfect sizing from the start.
    I can match the behavior you see by adjusting foobar2000 compatibility settings and forcing it to use System performed DPI scaling. Then the spectrum isn't clipped and all text goes blurry, like in your screenshot. But with default settings the scaling is unfortunately off. Doesn't matter whether the element is embedded to the UI or just opened quickly as a popup from the main menu.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-11-27 13:26:27
    For example, the top of the Y axis (-6db) cannot be displayed any further.
    Is it something like this?
    That's just a design choice I made. The bars will never extend higher than 0dB. I chose to let the top of Y-axis start at the top of the window, clipping the 0dB label.
    Either I start a little bit lower, creating a black band on top, or I can move the 0dB label a little bit lower. Or neither...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-11-27 13:27:32
    Using different Windows DPI setting than 100% clips the contents of the window and things are only partially visible. At least here easily reproducible.
    It's not here. I just switched one of my screens to 125%, created a new tab and added a new instance of the element. Perfect sizing from the start.
    I can match the behavior you see by adjusting foobar2000 compatibility settings and forcing it to use System performed DPI scaling. Then the spectrum isn't clipped and all text goes blurry, like in your screenshot. But with default settings the scaling is unfortunately off. Doesn't matter whether the element is embedded to the UI or just opened quickly as a popup from the main menu.
    Thx. I will try that later. I really want to get this solved.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-11-27 13:30:31
    the inability to manually put desired values into boxes is a shortcoming for me too.
    Some people would call that a UI improvement... Out of the box there's no decent numeric textbox with a spin control and edit functionality. I'm not yet 100% satisfied with the UI yet. I'll see what I can do.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Air KEN on 2023-11-27 13:47:37
    Enhanced Spectrum analyzer (foo_enhanced_spectrum_analyzer)
    -It is displayed inside the frame (above the image)

    (https://foobar2000.xrea.jp/up/files/up1494.png)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-11-27 14:19:59
    the inability to manually put desired values into boxes is a shortcoming for me too.
    Some people would call that a UI improvement... Out of the box there's no decent numeric textbox with a spin control and edit functionality. I'm not yet 100% satisfied with the UI yet. I'll see what I can do.

    Yes, the ability to click up-down to change the value a little (ex. from 20000 to 20010) is an improvement. But inability to manually change the value from 20000 to 96000 is a huge drawback. To do it, we have to click mamy, many times or hold the clicked tick for a long time.
    So it would be best if both methods worked.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2023-11-27 20:02:55
    I find it hard to accept that to view the X-axis when Windows is set to 125% scale (necessary for my vision) I must reset the DPI compatibility settings of the whole application and end up with blurry text.  The other spectrums I use on the same computer--Musical Spectrum with FB 1.6.17, and Enhanced Spectrum Analyzer with FB 2.1 64-bit--both show the X and Y axis just fine and with no compromise to the text.  I would hate to have to abandon such an excellent addition to FB's visualization selections because of this surely curable problem;  please,  I encourage you to give this thing another try.  Thanks!!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-11-27 21:44:54
    I find it hard to accept that to view the X-axis when Windows is set to 125% scale (necessary for my vision) I must reset the DPI compatibility settings of the whole application and end up with blurry text.  The other spectrums I use on the same computer--Musical Spectrum with FB 1.6.17, and Enhanced Spectrum Analyzer with FB 2.1 64-bit--both show the X and Y axis just fine and with no compromise to the text.  I would hate to have to abandon such an excellent addition to FB's visualization selections because of this surely curable problem;  please,  I encourage you to give this thing another try.  Thanks!!
    I'm not giving up. Obviously something is wrong with the size calculation. But it's hard to fix if I can't reproduce it. I have created DPI-aware controls in other projects before with DirectX but there I had control over the manifest that tells Windows what the code is capable of.
    A DLL must rely on the capabilities reported by its host, in this case fb2k.

    Edit: Breakthrough! At least I can reproduce it now... Thx to @Case  for saying the right thing at the right moment...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2023-11-28 00:58:17
    Edit: Breakthrough! At least I can reproduce it now... Thx to @Case  for saying the right thing at the right moment...
    Great!!  Thanks for not giving up!  Looking forward to the new version  :)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2023-11-28 01:59:09
    As I've played around ColorChord (https://github.com/cnlohr/colorchord) visualization (especially with the DFT and the spectrum on top of the ColorChord program), I have an idea for this spectrum analyzer, and that is a feature to display chromagram (https://en.wikipedia.org/wiki/Chroma_feature) (only makes sense on octave bands mode)

    Also, the feature to set interval for dB ticks to anything other than 6dB steps would be cool, and the feature to avoid overlapping texts (by not rendering the second text when the position is too close to each other) would be a good addition
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-11-29 16:06:37
    v0.4.1.1, 2023-11-29

    * New: Amplitude increment/decrement is configurable.
    * Improved: Some numeric controls are editable again. Range checking has been improved.
    * Improved: The high amplitude label and grid line on the Y axis are now fully visible.
    * Improved: Labels don't overlap anymore.
    * Fixed: The "Band Background" label was cut off.
    * Fixed: Range checking on some configuration panel controls.
    * Fixed: Content scaling should be DPI-aware now.
    * Fixed regression: Resetting the configuration failed.

    You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository.

    Hopefully all rendering failures are remedied now so that I can focus on polishing and new features...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Air KEN on 2023-11-29 16:40:22
    @pqyt

    great!

    foo_vis_spectrum_analyzer v0.4.1.1

    1920x1080
    Scale:125%

    (https://i.imgur.com/iJdd9O6.png)

    (https://i.imgur.com/vT227ar.png)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: da yuyu on 2023-11-29 16:44:22
    Thank you for this new component, working flawlessly here!  :)
    I am sorry I can´t comment on the sound wave technical aspects.
    I was playing with 'Fire' now, liking AIMP and Fade out peak modes a lot.
    Would it be worth adding an AIMP + Fade Out mode ?

    Anyway... I'm so glad I get to use such a great component!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Air KEN on 2023-11-29 17:13:41
    > Would it be worth adding an AIMP + Fade Out mode ?

    feel well.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2023-11-29 21:28:47
    Thanks pqyt, can't find a thing wrong with this superb spectrum!  Your hard work much appreciated.

    (https://i.imgur.com/ER3UIn0.png)

    (https://i.imgur.com/ZrbqJoC.png)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: da yuyu on 2023-11-30 01:06:42
    Not sure if it has been mentioned before... clicking Reset in the configuration panel crashes.
    Some settings are reset when restarting again, but not all.
    Tested in both 32/64 bit with the latest fb2k preview and component versions.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MG240 on 2023-11-30 04:21:32
    A crash happens in configuration panel.
    Steps to reproduce:
    1. Change color scheme to custom and edit any of the colors and press OK.
    2. Scroll the color scheme drop-down-list box using the mouse scroll wheel and the program crashes.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-11-30 05:12:59
    Not sure if it has been mentioned before... clicking Reset in the configuration panel crashes.
    Some settings are reset when restarting again, but not all.
    Tested in both 32/64 bit with the latest fb2k preview and component versions.
    Are you using 0.4.1.1? The 0.4.1.0 version had that regression.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: yeyo on 2023-11-30 06:06:05
    Suggestion: The color follows the user color settings of the DUI or CUI, such as background, text, select item, highlight color
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2023-11-30 07:29:59
    A couple of yet another suggestions:

    Also, a Columns UI support would be appreciated ss I said before, but only after all of features (like window functions, optional DC offset (makes sense when not using logarithmic frequency scale) and Nyquist frequency labels) missing from my own Web Audio API visualization on CodePen (https://codepen.io/TF3RDL/pen/poQJwRW) is added and improvements from my aforementioned project (e.g. a peak decay mode that emulate the behavior of peak indicators on spectrum analyzer in some AIMP5 skins, are now properly functioning on high sensitivity settings) are incorporated
    Title: Re: foo_vis_spectrum_analyzer
    Post by: da yuyu on 2023-11-30 08:36:44
    Are you using 0.4.1.1? The 0.4.1.0 version had that regression.

    You are right, it was v0.4.1.0. After the update the crash is gone, thanks!
    Once at it, in case it might help, I tried to replicate the issue changing colors reported above by MG240,
    but I could not replicate the crash here.



    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-11-30 11:18:34
    A crash happens in configuration panel.
    Steps to reproduce:
    1. Change color scheme to custom and edit any of the colors and press OK.
    2. Scroll the color scheme drop-down-list box using the mouse scroll wheel and the program crashes.
    Confirmed. Thx for the report.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-11-30 11:53:05
    Thanks pqyt, can't find a thing wrong with this superb spectrum!  Your hard work much appreciated.
    Thx but @TF3RDL should also be credited for his prototype and the math. Without that it would have taken a lot longer than 14 days to get this far.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: boxerfan88 on 2023-11-30 15:27:55
    Just updated to 0.4.1.1, the scaling is fixed, both the axis are displaying properly. Very nice indeed!
    Thank you very much for developing this component!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: ilovefb2k on 2023-12-01 04:46:06
    Just updated to 0.4.1.1, the scaling is fixed, both the axis are displaying properly. Very nice indeed!
    Thank you very much for developing this component!

    i got a problem to locate this component inside CUI, it looks very simple.
    Only when i run from menu (like view/visualizations/Spectrum Analyzer), it shows full function and configuration.
    Test with fb2k 2.0.
    Is that a bug ?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Air KEN on 2023-12-01 05:14:33
    @ilovefb2k

    Columns UI is not yet supported.
    Only popup display.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-12-01 07:39:02
    Hi,

    ver. 0.4.1.1 seems to work great for me. Thank you.
    One issue: now the settings popup is always "full-screen" vertically (meaning from the top to the bottom, but not horizontally) of my screen and can't be shrinked. Because is it from top to bottom, "reset", "OK" and "cancel" buttons are hidden behind MSWindows taskbar (bottom bar). I also cant move the settings window to another position. So the only way to change settings of the plugin (which needs "OK" to be clicked) is to change the settings of MSWin to auto-hide the taskbar - only then I can see the "OK" button of settings window.
    And one wish for future updates: It would be nice if pointing mouse cursor on any bar show the frequency/note on which the cursos is at the moment. I know we now can see the bottom axis with labels but that additional option  would greately increase the accuracy of the reading.

    Once again - thank you for this component.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2023-12-01 10:39:59
    Thanks pqyt, can't find a thing wrong with this superb spectrum!  Your hard work much appreciated.
    Thx but @TF3RDL should also be credited for his prototype and the math. Without that it would have taken a lot longer than 14 days to get this far.
    Yeah, as a couple of my own audio visualization projects on CodePen does the heavylifting for the math part (e.g. spectrum analyzers (https://codepen.io/TF3RDL/pen/VwENJbB) of different (https://codepen.io/TF3RDL/pen/poQJwRW) flavors (https://codepen.io/TF3RDL/pen/NWBYeaE), oscilloscope (https://codepen.io/TF3RDL/pen/WNgRLjQ) and vectorscope (https://codepen.io/TF3RDL/pen/ZEqMGzx), peak/RMS and balance/correlation metering (https://codepen.io/TF3RDL/pen/gOdWmVN), and Mid/Side representation for visualizing sum and difference parts of stereo/surround audio data)

    Also, the underlying audio analysis algorithm code (https://gist.github.com/TF3RDL/15326358806cabe3d69be792ff0012c7) from my sketch (https://editor.p5js.org/jayadiandri/sketches/CmiIhkILW) (which was created before I started using CodePen) that Vizzy.io uses for audio analyzers, includes weighting functions, which I also wished that @Crossover to have these frequency weighting functions implemented in next foo_enhanced_spectrum_analyzer (https://hydrogenaud.io/index.php/topic,115912.0.html) versions
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-01 12:30:19
    One issue: now the settings popup is always "full-screen" vertically (meaning from the top to the bottom, but not horizontally) of my screen and can't be shrinked. Because is it from top to bottom, "reset", "OK" and "cancel" buttons are hidden behind MSWindows taskbar (bottom bar). I also cant move the settings window to another position. So the only way to change settings of the plugin (which needs "OK" to be clicked) is to change the settings of MSWin to auto-hide the taskbar - only then I can see the "OK" button of settings window.
    ain - thank you for this component.
    The dialog is 'only' 700 pixels height. Even at 125% that's only 875 pixels. What's you're display resolution?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-12-01 16:36:52
    One issue: now the settings popup is always "full-screen" vertically (meaning from the top to the bottom, but not horizontally) of my screen and can't be shrinked. Because is it from top to bottom, "reset", "OK" and "cancel" buttons are hidden behind MSWindows taskbar (bottom bar). I also cant move the settings window to another position. So the only way to change settings of the plugin (which needs "OK" to be clicked) is to change the settings of MSWin to auto-hide the taskbar - only then I can see the "OK" button of settings window.
    ain - thank you for this component.
    The dialog is 'only' 700 pixels height. Even at 125% that's only 875 pixels. What's you're display resolution?

    Hi,

    my resolution is 1920*1080.
    I can drag the left or right edge of the window and widen it with mouse. But I can't do anything vertically. It stays solid from the bottom to the upper edge. Can't change the position of the window. Only widening is possible.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-01 17:11:58
    One issue: now the settings popup is always "full-screen" vertically (meaning from the top to the bottom, but not horizontally) of my screen and can't be shrinked. Because is it from top to bottom, "reset", "OK" and "cancel" buttons are hidden behind MSWindows taskbar (bottom bar). I also cant move the settings window to another position. So the only way to change settings of the plugin (which needs "OK" to be clicked) is to change the settings of MSWin to auto-hide the taskbar - only then I can see the "OK" button of settings window.
    ain - thank you for this component.
    The dialog is 'only' 700 pixels height. Even at 125% that's only 875 pixels. What's you're display resolution?

    Hi,

    my resolution is 1920*1080.
    I can drag the left or right edge of the window and widen it with mouse. But I can't do anything vertically. It stays solid from the bottom to the upper edge. Can't change the position of the window. Only widening is possible.
    Any window 'enhancer' or tiling tool that you are running? The configuration dialog is a standard modeless dialog without a min/max button. Have you tried to Reset all the settings? Possibly they are corrupt after trying some of the earlier alpha's.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-12-01 20:26:36
    One issue: now the settings popup is always "full-screen" vertically (meaning from the top to the bottom, but not horizontally) of my screen and can't be shrinked. Because is it from top to bottom, "reset", "OK" and "cancel" buttons are hidden behind MSWindows taskbar (bottom bar). I also cant move the settings window to another position. So the only way to change settings of the plugin (which needs "OK" to be clicked) is to change the settings of MSWin to auto-hide the taskbar - only then I can see the "OK" button of settings window.
    ain - thank you for this component.
    The dialog is 'only' 700 pixels height. Even at 125% that's only 875 pixels. What's you're display resolution?

    Hi,

    my resolution is 1920*1080.
    I can drag the left or right edge of the window and widen it with mouse. But I can't do anything vertically. It stays solid from the bottom to the upper edge. Can't change the position of the window. Only widening is possible.
    Any window 'enhancer' or tiling tool that you are running? The configuration dialog is a standard modeless dialog without a min/max button. Have you tried to Reset all the settings? Possibly they are corrupt after trying some of the earlier alpha's.
    What are window "enhancers" or tiling tools? I do not know what it is so probably do not have anything like this. My laptop is dedicated "audio-only" I do not use it for anything else than listening to music from foobar.
    I just reset your components settings but that did not help.
    It was OK up till the 0.4 version which did not display the bottom axis labels. Now I can see the labels but the settings window is not right.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2023-12-02 15:04:10
    Thank you so much.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Wayne VanWeerthuizen on 2023-12-02 16:52:01
    I have been using this extension for a few hours and love it and see no obvious problems.  :)

    My only two requests are (1) to have a way to color notes black and white just like on a piano keyboard, so the identities of the notes can more easily be recognized at a glance. (I like using it to see what notes singers are actually hitting.)

    And (2) to have 30 Hz as a "refresh rate limit" option, (but this is really quite minor, and in the meantime I can just use 20Hz or 60Hz and hardly even see the difference).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-02 18:29:00
    My only two requests are (1) to have a way to color notes black and white just like on a piano keyboard, so the identities of the notes can more easily be recognized at a glance. (I like using it to see what notes singers are actually hitting.)
    It's already on my To Do list but the UI part is as usual a pain. Probably not in the next version.
    And (2) to have 30 Hz as a "refresh rate limit" option, (but this is really quite minor, and in the meantime I can just use 20Hz or 60Hz and hardly even see the difference).
    It's in the next version. There is a measurable difference up to 60fps but the component currently uses a low-accuracy timer causing anything above 60 fps practically impossible to reach. I'm investigating the Windows high-accuracy timers.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-03 21:05:28
    v0.4.2.0, 2023-12-03

    * New: Hovering over the spectrum displays a tooltip with the center frequency and the note name (when applicable) of the band over which the mouse hovers.
    * New: You can select which channels will be used during the transform in the configuration dialog.
    * New: You can select the window function that will be applied to the samples.
    * Improved: Made color scheme editing more resilient.
    * Improved: Added 30fps refresh rate.
    * Improved: The configuration dialog does no longer restrict the minimum size. You can resize it to any size no in case some controls are not accessible.

    You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository.

    The code quality is now good enough to open it up to public scrutiny. You'll find it on GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2023-12-03 21:47:21
    Unfortunately, problems from the get-go with 0.4.2.0:

    1.  Right-clicking inside the panel and choosing "Configure" only produces a "flickering" square showing the pointer's freq/note position, no configuration window appears.

    2.  Also created is an odd box in the upper left corner of Foobar with "S..  ?  X" in it that does nothing I can determine, except hitting the "X" makes it go away (see attached).

    (Foobar x64 2.1 2023-11-27 Preview)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Air KEN on 2023-12-04 04:48:12
    @pqyt

    Spectrum Analyzer Configurartion Windows fonts:

    Can you make it a system font?
    Or is it not possible to choose?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-04 05:26:55
    @pqyt

    Spectrum Analyzer Configurartion Windows fonts:

    Can you make it a system font?
    Or is it not possible to choose?
    The font of the dialog itself because that should already be the case? Or do you mean the font of the text used on the axes?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-04 05:29:12
    Unfortunately, problems from the get-go with 0.4.2.0:

    1.  Right-clicking inside the panel and choosing "Configure" only produces a "flickering" square showing the pointer's freq/note position, no configuration window appears.

    2.  Also created is an odd box in the upper left corner of Foobar with "S..  ?  X" in it that does nothing I can determine, except hitting the "X" makes it go away (see attached).

    (Foobar x64 2.1 2023-11-27 Preview)
    The flickering is the tooltip that seems to turn on and off. And how you get a 0x0 dialog by default is a mystery, for now...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Air KEN on 2023-12-04 05:33:02
    @pqyt

    Spectrum Analyzer Configurartion Windows fonts:

    Can you make it a system font?
    Or is it not possible to choose?
    The font of the dialog itself because that should already be the case? Or do you mean the font of the text used on the axes?
    It's a dialog font.
    Oh, I see.
    It would be convenient if I could choose by myself.
    Yu Gothic UI's small size is hard to see.

    Thanks.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-04 05:44:26
    Unfortunately, problems from the get-go with 0.4.2.0:

    1.  Right-clicking inside the panel and choosing "Configure" only produces a "flickering" square showing the pointer's freq/note position, no configuration window appears.

    2.  Also created is an odd box in the upper left corner of Foobar with "S..  ?  X" in it that does nothing I can determine, except hitting the "X" makes it go away (see attached).

    (Foobar x64 2.1 2023-11-27 Preview)
    The flickering is the tooltip that seems to turn on and off. And how you get a 0x0 dialog by default is a mystery, for now...
    Unfortunately, problems from the get-go with 0.4.2.0:

    1.  Right-clicking inside the panel and choosing "Configure" only produces a "flickering" square showing the pointer's freq/note position, no configuration window appears.

    2.  Also created is an odd box in the upper left corner of Foobar with "S..  ?  X" in it that does nothing I can determine, except hitting the "X" makes it go away (see attached).

    (Foobar x64 2.1 2023-11-27 Preview)
    You can resize and reposition it for now. The new size and position will be remembered from then on. It's a stupid initialization bug...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2023-12-04 07:01:21
    You can resize and reposition it for now. The new size and position will be remembered from then on. It's a stupid initialization bug...
    Ah, OK.  Once I started pulling on the sides of the "stub" I could see it had been a TOTALLY folded/closed window with the config dialog therein.  Man that was a "good" one though!!  Yes the resize fixes it from then on.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-12-04 10:25:45
    Unfortunately, problems from the get-go with 0.4.2.0:

    1.  Right-clicking inside the panel and choosing "Configure" only produces a "flickering" square showing the pointer's freq/note position, no configuration window appears.

    2.  Also created is an odd box in the upper left corner of Foobar with "S..  ?  X" in it that does nothing I can determine, except hitting the "X" makes it go away (see attached).

    (Foobar x64 2.1 2023-11-27 Preview)
    The flickering is the tooltip that seems to turn on and off. And how you get a 0x0 dialog by default is a mystery, for now...
    Unfortunately, problems from the get-go with 0.4.2.0:

    1.  Right-clicking inside the panel and choosing "Configure" only produces a "flickering" square showing the pointer's freq/note position, no configuration window appears.

    2.  Also created is an odd box in the upper left corner of Foobar with "S..  ?  X" in it that does nothing I can determine, except hitting the "X" makes it go away (see attached).

    (Foobar x64 2.1 2023-11-27 Preview)
    You can resize and reposition it for now. The new size and position will be remembered from then on. It's a stupid initialization bug...

    Hi,

    resizing works but it does nothing good for me. If I shrink the windowI can't see the whole content so I still can't accept the changes (as I do not see the OK button). The window is bigger than the previous one so it is even worse.
    Please implement a sliding bar on theedge of the window so if we shrink it we would be able to scroll up and down inside the window to be able to properly use it.

    Plus there is a bug: if I put a mouse cursor over any bar it shows some frequency/note but it shows proper values only up to some freq/note (let's say about 16kHz). Everything above that value becomes inconsistent with bottom axis values - ex. it becomes 60kHz and stays at this value no matter if I move the cursor further to the right or left.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-04 12:01:42
    resizing works but it does nothing good for me. If I shrink the windowI can't see the whole content so I still can't accept the changes (as I do not see the OK button). The window is bigger than the previous one so it is even worse.
    But if you shrink it from the top you can move it so that the OK button becomes accessible.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-12-04 15:46:50
    resizing works but it does nothing good for me. If I shrink the windowI can't see the whole content so I still can't accept the changes (as I do not see the OK button). The window is bigger than the previous one so it is even worse.
    But if you shrink it from the top you can move it so that the OK button becomes accessible.


    Unfortunately not.
    Shrinking always hides the bottom part of the window, no matter if I shrink from the top or from the bottom. So the more I shrink the less of the bottom settings I see. Always see the upper part.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-12-05 18:07:46
    I just installed v. 0.4.2.1 and still both defects exist:
    - can't use settings because the window does not fit on the screen and can't be properly shinked
    - frequencies/notes displayed on the bars are improper
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pablak on 2023-12-05 19:20:46
    Any chances to add as panel in Columns UI like other visualizations?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-05 19:21:16
    I just installed v. 0.4.2.1 and still both defects exist:
    - can't use settings because the window does not fit on the screen and can't be properly shinked
    I had no intention to do anything about it. Your use case is an edge case. I already spent too much time on the UI.
    - frequencies/notes displayed on the bars are improper
    No, they are not. They are displayed as intended.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-05 19:22:35
    Any chances to add as panel in Columns UI like other visualizations?
    Yes, but it's new territory for me. I'll have to study it first because the example on it's website does not compile.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-12-05 21:33:32
    I just installed v. 0.4.2.1 and still both defects exist:
    - can't use settings because the window does not fit on the screen and can't be properly shinked
    I had no intention to do anything about it. Your use case is an edge case. I already spent too much time on the UI.
    - frequencies/notes displayed on the bars are improper
    No, they are not. They are displayed as intended.

    No, the frequencies are wrong. I set the frequencies from 20Hz to 60001Hz - when pointing on bars, the freqs are right only to a certain freq. Let' s say about 16kHz (more of less, I do not have access to that lapto now) but they become 60001Hz right above that and always stay at 60001 no mater how far right or lest I go (above that "border" freq).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2023-12-06 06:49:29
    Thanks pqyt for the update, the spectrum never looked better!

    I have noticed in relation to wojak's issue that when I move the pointer through the display horizontally, the max frequency shown in the tooltip  will reach and rest at my max setting (24000 Hz) at about 85% through the chart, and stay at that value for the rest of the display.  Also the tooltip values seems to not match the value shown on the X-axis.  However, my own settings use a logarithmic freq scaling but on a linear frequency distribution setting, and I assume that is what is causing the tooltip effect, along with my bandwidth setting and X-axis mode vs. number of bands used.  I do get the display/activity I wanted of the spectrum itself, which is what is most important to me.  The new 30-Hz setting was an excellent addition.

    I don't normally activate the tooltip setting anyhow so it's not relevant to my own use but maybe the above will help wojak do some more experimenting and find the matrix of settings that work better for him.  I don't think it's a bug, just a LOT of settings and they all affect each other.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-06 09:15:04
    The tooltip has nothing to do with the X-axis. It shows the center frequency and, when appropriate, the note name of the bin. The X-axis is an approximation anyway. So the driving factor is the specification in the Frequencies part of the configuration.

    When you specify a freq. range e.g. between 20Hz and 96kHz, the last bin will show 96kHz no matter what X-axis setting you set.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2023-12-06 09:33:15
    Yes, but it's new territory for me. I'll have to study it first because the example on it's website does not compile.

    I've attached the simplest CUI panel I have. It should contain enough to get you started.

    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-12-06 11:08:05
    The tooltip has nothing to do with the X-axis. It shows the center frequency and, when appropriate, the note name of the bin. The X-axis is an approximation anyway. So the driving factor is the specification in the Frequencies part of the configuration.

    When you specify a freq. range e.g. between 20Hz and 96kHz, the last bin will show 96kHz no matter what X-axis setting you set.

    But the problem is that not only the last bin shows 96kHz but all the bins higher than ex. 16kHz (this is just an example) always show 96kHz. Meaning for. ex. that last 50 bins all show 96kHz. So when we look on the x-axis and see 20kHz or 30kHz and we point the cursor on corresponding bins they do not show 20 or 30 respectively. They show 96.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-06 11:14:08
    Confirmed. It's a high-DPI thing again. I'm getting pretty fed-up with this mess. DirectX is supposed to be resolution independent. But somewhere in the mapping of the mouse coordinates something goes wrong...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2023-12-06 12:04:34
    I couldn't attach a file via pm so here are my includes for that example.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2023-12-06 17:26:46
    Confirmed. It's a high-DPI thing again. I'm getting pretty fed-up with this mess. DirectX is supposed to be resolution independent. But somewhere in the mapping of the mouse coordinates something goes wrong...
    Thanks for confirming this.  I'm wondering what the code considers to be "high-DPI"--I am using a regular HDMI monitor with Windows set to 125% scale and the screen resolution at 1920 X 1080.  Your efforts have been and are appreciated and I'm more than willing to accept your work at whatever stage you are satisfied with.  It's a beautiful and effective spectrum.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-12-07 07:36:20
    Confirmed. It's a high-DPI thing again. I'm getting pretty fed-up with this mess. DirectX is supposed to be resolution independent. But somewhere in the mapping of the mouse coordinates something goes wrong...
    Thanks for confirming this.  I'm wondering what the code considers to be "high-DPI"--I am using a regular HDMI monitor with Windows set to 125% scale and the screen resolution at 1920 X 1080.  Your efforts have been and are appreciated and I'm more than willing to accept your work at whatever stage you are satisfied with.  It's a beautiful and effective spectrum.

    I use foobar on dedicated audio-only-laptop connected to 46''TV. My resolution is 1920*1080 and the size is set to 150%. I look at it from about 4-5 meters so going down to 125% makes everything unreadable for me, the text is just too small. So I just have to be on  150% - no other option.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-08 08:01:57
    v0.5.0.0, 2023-12-08

    * New: Columns UI support.
    * Fixed: Tooltips display at the correct position on installations scaled higher than 100%.

    You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or upgrade from within foobar2000.

    Thanks to @musicmusic for helping me with the release bug.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Air KEN on 2023-12-08 08:36:01
    Spectrum Analyzer 0.5.0.0
    Change log:
    New: Columns UI support.

    Really?

    (https://i.imgur.com/BIbNvrL.png)

    foobar2000 core 2.1 preview 2023-12-06 64bit
    Columns UI 2.1.0 (foo_ui_columns) 2023-09-26
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2023-12-08 09:46:46
    I think a more distinctive name is required to seperate it from the stock CUI visualisation...

    It's easy for me to tell because I know musicmusic uses British English spelling like I do. Not so easy for others. :P

    Title: Re: foo_vis_spectrum_analyzer
    Post by: Air KEN on 2023-12-08 10:15:48
    @marc2k3
    Many Thanks.

    OMG

    orz...

    Spectrum Analyzer
    Spectrum analyzer

    Sorry  pqyt

    (https://i.imgur.com/nOPdmiC.png)

    (https://i.imgur.com/rjjZoZV.png)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2023-12-08 12:20:46
    I think a more distinctive name is required to seperate it from the stock CUI visualisation...

    It's easy for me to tell because I know musicmusic uses British English spelling like I do. Not so easy for others. :P


    Agreed with you, I think the name of this component should be renamed to "Audio Spectrum" or alternatively "FFT Analyzer" (yeah, @pqyt are allowed to namesnipe concept components) to avoid confusion with the one and the only built-in visualization of Columns UI (barring from built-in DUI visualizations that got added into CUI in foobar2000 v2.0) "Spectrum analyser" panel

    Also, I've updated my own spectrum analyzer project (https://codepen.io/TF3RDL/pen/poQJwRW) (which this component is based off) to implement weighting/slope/equalize functions (which I've also wanted this for Enhanced Spectrum analyzer component besides frequency tilt, which already exists in foo_enhanced_spectrum_analyzer 1.9.2.0) as well as the ability to use complex FFT as input for triangular filter banks (which I found out it changes the time resolution for higher frequencies when the triangular filter bank is set to use complex FFT value instead during summation and later converted to magnitude data afterwards)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-12-08 17:19:59
    v0.5.0.0, 2023-12-08

    * New: Columns UI support.
    * Fixed: Tooltips display at the correct position on installations scaled higher than 100%.

    You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or upgrade from within foobar2000.

    Thanks to @musicmusic for helping me with the release bug.

    Hi,

    v 0.5:
    + bars show proper values - thanks!!1
    - setting window still does not fit on the screen and can't be used with my setup.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: brichanfiana on 2023-12-08 20:50:10
    v0.5.0.0 Frequency range configuration.
    There appears to be a problem with the storage of the Frequency range.
    After specifying 20.00 to 96000.00 in the settings (image 1) and once exiting Foobar 2.1 Preview, the saved settings are 96000.00 to 20000.00 (image 2).
    In v0.4.2.1, the settings were saved successfully. The same was also true after initialisation by clicking the Reset button.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-08 21:36:06
    v0.5.0.0 Frequency range configuration.
    There appears to be a problem with the storage of the Frequency range.
    After specifying 20.00 to 96000.00 in the settings (image 1) and once exiting Foobar 2.1 Preview, the saved settings are 96000.00 to 20000.00 (image 2).
    In v0.4.2.1, the settings were saved successfully. The same was also true after initialisation by clicking the Reset button.
    Yup. Copy/Paste error. The low frequency is read twice from the CUI configuration. I'll release a hot fix.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2023-12-08 22:03:57
    Also check the Lanczos kernel value--has an unlikely default of 32 at first install, but then returns to "1" no matter what it is changed to.  Other than that, this version is perfect--scaling and performance.  This is using a DUI panel.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: brichanfiana on 2023-12-08 22:10:52
    Yup. Copy/Paste error. The low frequency is read twice from the CUI configuration. I'll release a hot fix.
    Thank you for providing the v0.5.0.1 HotFix.
    We have confirmed that the defect has been fixed.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-12-09 09:16:34
    v0.5.0.0 Frequency range configuration.
    There appears to be a problem with the storage of the Frequency range.
    After specifying 20.00 to 96000.00 in the settings (image 1) and once exiting Foobar 2.1 Preview, the saved settings are 96000.00 to 20000.00 (image 2).
    In v0.4.2.1, the settings were saved successfully. The same was also true after initialisation by clicking the Reset button.
    Yup. Copy/Paste error. The low frequency is read twice from the CUI configuration. I'll release a hot fix.

    Hi,
    as I still have the same problem with settings window, maybe you could try to change the position of "OK, reset..." buttons to the side of the window (upper part of the window) or maybe change the position of some setting in order to make the window wider but flatter?
    It is OK when settings are 100%, it is only visible with bottom bar hidden with 125% and it is never visible with 150%. I have to be at 150%.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2023-12-09 22:39:09
    I just noticed that the 32-bit version of the plugin is not useable with Foobar 1.6.17--when attempting to install, Foobar produces a "failed to load DLL, not compatible with this version of the Foobar SDK" message.  Any chance of making it backward compatible with the older SDK?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-10 00:22:46
    I just noticed that the 32-bit version of the plugin is not useable with Foobar 1.6.17--when attempting to install, Foobar produces a "failed to load DLL, not compatible with this version of the Foobar SDK" message.  Any chance of making it backward compatible with the older SDK?
    You'll have to ask Peter to back-port the API's. The message is generated by foobar2000 itself.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2023-12-10 02:43:06
    I just noticed that the 32-bit version of the plugin is not useable with Foobar 1.6.17--when attempting to install, Foobar produces a "failed to load DLL, not compatible with this version of the Foobar SDK" message.  Any chance of making it backward compatible with the older SDK?
    You'll have to ask Peter to back-port the API's. The message is generated by foobar2000 itself.
    Fair enough, what @sveakul didn't know is that this component requires foobar2000 v2.0 (which is the first version to get a 64-bit version) and later

    Also, I've added a window function called Galss (which I come up with the name of such exotic window function that no one seen before, not to be confused with Gaussian), which equals to "f(x) = (((1-1/(x+2))*(1-1/(-x+2)))*4)^2 * -(tanh(sqrt(2)*(-x+1))*tanh(sqrt(2)*(-x-1)))/(tanh(sqrt(2)) ^ 2)", which has higher sidelobe amplitude at close proximity to mainlobe than Hann window but with better sidelobe rolloff than Hann window to my own spectrum analyzer project (https://codepen.io/TF3RDL/pen/poQJwRW) and I've changed the Welch/parabola window to make it adjustable (for consistency with power of sine and power of semicircle windows, the latter of which falls into the category of exotic window functions since not many papers mention it)

    BTW (assuming this component have window function set to Hann, which is the default setting), I've tested the mono vs. stereo audio and spectral leakage thing and I've found that opening this visualization component on mono audio before applying convert mono to stereo DSP afterwards shifts the position on the peaks and opening the same component on the stereo audio (or mono audio with the same DSP applied before the visualization window opens) have high sidelobes comparable to rectangular window
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2023-12-10 08:44:28
    I just noticed that the 32-bit version of the plugin is not useable with Foobar 1.6.17--when attempting to install, Foobar produces a "failed to load DLL, not compatible with this version of the Foobar SDK" message.  Any chance of making it backward compatible with the older SDK?
    You'll have to ask Peter to back-port the API's. The message is generated by foobar2000 itself.
    I just compiled your latest sources with the latest SDK with FOOBAR2000_TARGET_VERSION at 80, which is the default, and the component works fine even on foobar2000 v1.5.

    Are you perhaps using the foobar2000 SDK 2023-09-06? It had a bug in its version defines and it defaulted to require foobar2000 v2.0. It was fixable by editing the version defines and a fixed version was uploaded a week later.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-10 10:55:58
    I just noticed that the 32-bit version of the plugin is not useable with Foobar 1.6.17--when attempting to install, Foobar produces a "failed to load DLL, not compatible with this version of the Foobar SDK" message.  Any chance of making it backward compatible with the older SDK?
    You'll have to ask Peter to back-port the API's. The message is generated by foobar2000 itself.
    I just compiled your latest sources with the latest SDK with FOOBAR2000_TARGET_VERSION at 80, which is the default, and the component works fine even on foobar2000 v1.5.

    Are you perhaps using the foobar2000 SDK 2023-09-06? It had a bug in its version defines and it defaulted to require foobar2000 v2.0. It was fixable by editing the version defines and a fixed version was uploaded a week later.
    Yes, 2023-09-06. I'll upgrade and use it for the next version.

    On the subject of bugs: any chance on addressing the warnings the SDK generates in VS2022 during compilation:
    - gmtime()
    - localtime()
    - strdup()
    - GetVersionExW()
    - GetVersion
    - wcscpy()
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2023-12-11 09:11:50
    FR: The feature to display spectrum of multiple channels simultaneously, either in horizontal (like Channel Spectrum panel), vertical (like in audioMotion-analyzer (https://github.com/hvianna/audioMotion-analyzer)), or combined with different colors (like in Voxengo SPAN and MeldaProduction MMultiAnalyzer)

    Also, a Mid/Side channel representations would be appreciated since fb2k is supposed to be focused on something functional (and thus more analysis-oriented visualizations like spectrum analyzers and spectrograms than trippy ones like MilkDrop) in comparison to other players like AIMP5
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-11 16:49:41
    I have been using this extension for a few hours and love it and see no obvious problems.  :)

    My only two requests are (1) to have a way to color notes black and white just like on a piano keyboard, so the identities of the notes can more easily be recognized at a glance. (I like using it to see what notes singers are actually hitting.)

    And (2) to have 30 Hz as a "refresh rate limit" option, (but this is really quite minor, and in the meantime I can just use 20Hz or 60Hz and hardly even see the difference).
    I'm ready to look at this request but fail to see how it would work.

    1. Do you want the spectrum bars black and white?
    2. Do you want the bar background black and white?
    3. Do you want me to copy how foo_musical_spectrum solved it?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-14 20:29:42
    v0.5.1.0, 2023-12-14

    * New: Support for DUI and CUI default user interface colors.
    * New: LED mode.
    * New: The color scheme can be used as a horizontal gradient.
    * New: The color for the background of white and black 'keys' can be selected separately.
    * New: Galss window function.
    * Improved: Rendering occurs on a separate thread resulting in smoother animation.
    * Improved: Re-designed configuration dialog to fit on installations scaled higher than 100%.
    * Fixed: Some settings were reset when the configuration dialog re-opened during the same session.
    * Fixed: Scaling method was available when other than Linear distribution was selected.
    * Fixed: Bug in Median, RMS and RMS Sum summation method.

    You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or upgrade from within foobar2000.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2023-12-14 21:20:04
    pqyt: does this version use the fixed SDK mentioned here (https://hydrogenaud.io/index.php/topic,125031.msg1036213.html#msg1036213) so that is now compatible with Foobar 1.6.17 as well?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2023-12-14 23:04:10
    pqyt: does this version use the fixed SDK mentioned here (https://hydrogenaud.io/index.php/topic,125031.msg1036213.html#msg1036213) so that is now compatible with Foobar 1.6.17 as well?
    Answering my own question, YES!  Thank you pqyt!  Fully compatible and looking as great with Foobar 1.6.17 32-bit as it does with my 64-bit Foobar v2.1.  Much smoother, now I run at 60 Hz and get my desired spectrum response, LED mode works fine but sticking with bars.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: yeyo on 2023-12-15 08:18:50
    DUI and CUI's default user interface color support needs to be improved, and it cannot be accurately rendered at present, foo_enhanced_spectrum_analyzer the support is very good, DUI can support 4 color combinations: background, text, selected, highlight; CUI supports more color combinations, comparison chart (foo_enhanced_spectrum_analyzer above):
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Sue Dunham on 2023-12-15 21:48:26
    I'm having difficulty adding the component to an existing 64-bit CUI theme; foobar crashes. I can add it to a fresh install, but I'm reluctant to rebuild the theme around it there.

    I haven't had any trouble with previous 32-bit CUI and 64-bit DUI installations.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-12-16 08:50:46
    v0.5.1.0, 2023-12-14

    * New: Support for DUI and CUI default user interface colors.
    * New: LED mode.
    * New: The color scheme can be used as a horizontal gradient.
    * New: The color for the background of white and black 'keys' can be selected separately.
    * New: Galss window function.
    * Improved: Rendering occurs on a separate thread resulting in smoother animation.
    * Improved: Re-designed configuration dialog to fit on installations scaled higher than 100%.
    * Fixed: Some settings were reset when the configuration dialog re-opened during the same session.
    * Fixed: Scaling method was available when other than Linear distribution was selected.
    * Fixed: Bug in Median, RMS and RMS Sum summation method.

    You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or upgrade from within foobar2000.

    Hi,
    thank you very much, it works and look great. The setting windows fits my screen:).

    One small request: Since we can set freqs form ex. 1Hz to 96kHz (probably even more), it would be great if the x-axis labels (being notes) would reflect that. Now the forst labels is C0 and last is C10 (or 11). Could you please add labels below and above it (C_1 (or C-1)...and so on)?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-17 09:01:34
    One small request: Since we can set freqs form ex. 1Hz to 96kHz (probably even more), it would be great if the x-axis labels (being notes) would reflect that. Now the forst labels is C0 and last is C10 (or 11). Could you please add labels below and above it (C_1 (or C-1)...and so on)?
    Why? Simply for display purposes? Anything above 20kHz is not audible. It does not make sense to assign a 'note' letter to it.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2023-12-17 10:00:03
    One small request: Since we can set freqs form ex. 1Hz to 96kHz (probably even more), it would be great if the x-axis labels (being notes) would reflect that. Now the forst labels is C0 and last is C10 (or 11). Could you please add labels below and above it (C_1 (or C-1)...and so on)?
    Why? Simply for display purposes? Anything above 20kHz is not audible. It does not make sense to assign a 'note' letter to it.

    Isn't the whole component made for displaying the content? It does not matter if it is considered audible or not. The component shows the content, so why would it show only part of the content properly and the rest without the labels?
    Yes it is only for visualisation. Anyway it shows frequencies so it should be consisntet regardless of the labeling/scalling onthe axis.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Brazil2 on 2023-12-18 21:57:11
    pqyt: does this version use the fixed SDK mentioned here (https://hydrogenaud.io/index.php/topic,125031.msg1036213.html#msg1036213) so that is now compatible with Foobar 1.6.17 as well?
    Answering my own question, YES!  Thank you pqyt!  Fully compatible and looking as great with Foobar 1.6.17 32-bit as it does with my 64-bit Foobar v2.1.
    This component seems to break foobar2000 compatibility with Windows 7 and 8.1. Because I'm getting this error message on Windows 7 and 8.1:
    Failed to load DLL: foo_vis_spectrum_analyzer.dll
    Reason: The specified procedure could not be found

    Searching with an hex editor, I can see some reference to atlthunk.dll but this DLL is available only on Windows 10 or above :(
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2023-12-19 06:19:10
    Installing two instances of the Columns UI panel foo_vis_spectrum_analyser causes a crash.

    Crashlog posted in wrong thread: https://hydrogenaud.io/index.php/topic,125185.msg1036559.html#msg1036559
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Cosh on 2023-12-19 08:56:22
    Hello, is it possible add to the column tab a 'present' tab, so we could save presents (settings, colours etc) and function to export/import these presents?
    thank you pqyt for your work! 👌
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Cosh on 2023-12-19 20:52:02
    Presets sorry for my error in previous post 🙏
    This is how it could look, for better access imho it would be better in this way in one section
    Save - saves changes to current active preset
    Import [file]
    Export [file]
    Duplicate - duplicate actual active preset - prompt how name duplicated preset
    Auto Save - tick option
    *Copy settings from different preset to actual active preset
    * Reset preset to default


    (https://i.postimg.cc/y8dYgWm7/Untitled-4.jpg)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-20 15:02:32
    pqyt: does this version use the fixed SDK mentioned here (https://hydrogenaud.io/index.php/topic,125031.msg1036213.html#msg1036213) so that is now compatible with Foobar 1.6.17 as well?
    Answering my own question, YES!  Thank you pqyt!  Fully compatible and looking as great with Foobar 1.6.17 32-bit as it does with my 64-bit Foobar v2.1.
    This component seems to break foobar2000 compatibility with Windows 7 and 8.1. Because I'm getting this error message on Windows 7 and 8.1:
    Failed to load DLL: foo_vis_spectrum_analyzer.dll
    Reason: The specified procedure could not be found

    Searching with an hex editor, I can see some reference to atlthunk.dll but this DLL is available only on Windows 10 or above :(
    While I don't intentionally exclude older Windows versions, I don't support them either. I go where the compiler and the SDK takes me. I don't have access to those old versions anymore.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2023-12-21 06:40:23
    The component doesn't work on anything older than Windows 10 because it calls GetDpiForWindow (https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdpiforwindow) function, which was introduced in Windows 10. If the function is necessary to get over all the DPI issues people have suffered one simple solution would be to only use it on Win10 or newer.

    I noticed the visualization element is created with default bright background causing it to flash rather nastily on start before rendering its correct colors.

    There may be something wrong with the fancy up/down arrows next to numeric values. With default config for example hitting the up arrow next to Pitch increases the value from 440.00 to 440.50. Then hitting down arrow changes the value to 44.50.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Sue Dunham on 2023-12-21 17:32:44
    I'm having difficulty adding the component to an existing 64-bit CUI theme; foobar crashes. I can add it to a fresh install, but I'm reluctant to rebuild the theme around it there.

    I haven't had any trouble with previous 32-bit CUI and 64-bit DUI installations.


    I found a workaround for this that may shed a little light. The sticking point in 64-bit CUI seemed to be adding one of these to the layout and removing the CUI-stock Spectrum analyzer in the same operation. I could add this component, press OK, restart fb2k, and then remove the other spectrum successfully.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-21 17:45:10
    I'm having difficulty adding the component to an existing 64-bit CUI theme; foobar crashes. I can add it to a fresh install, but I'm reluctant to rebuild the theme around it there.

    I haven't had any trouble with previous 32-bit CUI and 64-bit DUI installations.


    I found a workaround for this that may shed a little light. The sticking point in 64-bit CUI seemed to be adding one of these to the layout and removing the CUI-stock Spectrum analyzer in the same operation. I could add this component, press OK, restart fb2k, and then remove the other spectrum successfully.
    Thx for the investigation. I haven't had the time for it yet. Not sure why 2 separate visualizations may cause a problem. There's another report about a crash when 2 instances of my component are added to CUI. Maybe that provides a clue.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2023-12-21 19:32:30
    To reproduce the crash: Add Tab Stack in CUI layout, add panel Spectrum Analyzer in Tab Stack. Crash.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Sue Dunham on 2023-12-22 15:08:23
    I've been using 2 spectrum analyzers in the same layout without any trouble. This is for CUI, both 32-bit and 64-bit. I haven't gotten to it yet with my 64-bit DUI layout. One has the left front, left rear, and left side channels and the other the corresponding right channels. This is overly optimistic since my setup is just plain stereo, but it seemed like the thing to do.  :)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2023-12-23 15:53:14
    To reproduce the crash: Add Tab Stack in CUI layout, add panel Spectrum Analyzer in Tab Stack. Crash.

    Can confirm the crash on 64bit. 32bit seems OK.

    Had a quick peak at the CUI config reader and that's problematic:
    -it should bail if the size is zero / not more than the first value
    -it should use try/catch
    -it should not be using size_t anywhere. This obviously differs depending on 32bit/64bit meaning config files are not portable.

    edit: submitted a PR https://github.com/stuerp/foo_vis_spectrum_analyzer/pull/7

    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-23 16:14:19
    -it should not be using size_t anywhere. This obviously differs depending on 32bit/64bit meaning config files are not portable.
    Huh? Why is that problematic? When will config files be exchanged between platforms?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2023-12-23 17:12:47
    Since stock CUI/DUI layouts can be shared, it's just something I would expect* from 3rd parties as well. I took care to make sure my component played nice when I updated - it pre-dated the advent of 64bit by many years. :P

    *maybe my expectations are too high. It obviously can't be enforced in any way and if people get the configuration of a single panel reset without crashing, it's not really an issue.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Lebon14 on 2023-12-24 07:28:33
    Tried it in my port of my setup to v2.0 x64 (it's not a perfect 1:1 but I got pretty close).

    However, while this new x64 version of Channel Spectrum panel is pretty good, there's at least one of two things I'd love to see:
    - Be able to flip the visualition on both axis.
    and/or
    - Stereo and/or surround imaging.

    Another thing: be able to import settings from Channel Spectrum panel and replicate as best as possible would be sweet as well but not obligatory.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-24 12:04:04
    - Be able to flip the visualition on both axis.
    Considering it.
    - Stereo and/or surround imaging.
    What's that?
    Another thing: be able to import settings from Channel Spectrum panel and replicate as best as possible would be sweet as well but not obligatory.
    Not possible since the format is not documented.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2023-12-24 23:40:22
    Glitch: Spectrum Analyzer DUI/CUI panel, Configure, OK, no tooltip in Spectrum Analyzer panel
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-25 00:22:21
    Glitch: Spectrum Analyzer DUI/CUI panel, Configure, OK, no tooltip in Spectrum Analyzer panel
    It sometimes does that. Moving in and out the panel window is a work-around. I have no clue why the tooltip behaves like that.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Wolverines on 2023-12-25 09:58:22
    To reproduce the crash: Add Tab Stack in CUI layout, add panel Spectrum Analyzer in Tab Stack. Crash.
    Exactly what happens to me on v2.1 x64. Works fine in the same situation on v2.1 x32.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Sue Dunham on 2023-12-27 13:18:46
    I'm trying to match my 64-bit settings to my 32-bit ones, and there's a difference in the color blending that I can't account for. The 32-bit is on the left, and the top (pink) end seems to be favored with the darkest blue having a narrower band.

    The 32-bit came first when I was still figuring out how to work with the colors, so it did involve more trial and error, while the 64-bit one was done more quickly and directly. But all the settings I can see seem to be matched.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-27 14:34:29
    I'm trying to match my 64-bit settings to my 32-bit ones, and there's a difference in the color blending that I can't account for. The 32-bit is on the left, and the top (pink) end seems to be favored with the darkest blue having a narrower band.

    The 32-bit came first when I was still figuring out how to work with the colors, so it did involve more trial and error, while the 64-bit one was done more quickly and directly. But all the settings I can see seem to be matched.
    I see it but can't explain it yet. In the right screenshot the Add and Remove buttons are disabled. The distribution between the colors is linear because I haven't had the time (and energy) to write a full-blown gradient editor yet. A problem in the spread indicates there's an extra color somewhere in the gradient, even though I don't see it.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-28 14:27:17
    I missed this reply earlier...

    The component doesn't work on anything older than Windows 10 because it calls GetDpiForWindow (https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdpiforwindow) function, which was introduced in Windows 10. If the function is necessary to get over all the DPI issues people have suffered one simple solution would be to only use it on Win10 or newer.
    It's not necessary but the ID2D1Factory::GetDesktopDpi() got deprecated and replaced by GetDpiForWindow(). And yes, that makes me a little liar... I forgot I made this change. I try to deliver a warning free build and don't like 'deprecation' warnings. I'll add a fall-back case for older Windows versions.

    I noticed the visualization element is created with default bright background causing it to flash rather nastily on start before rendering its correct colors.
    Should be fixed in the next release.

    There may be something wrong with the fancy up/down arrows next to numeric values. With default config for example hitting the up arrow next to Pitch increases the value from 440.00 to 440.50. Then hitting down arrow changes the value to 44.50.
    Will be fixed in the next release. I used a factor of 10 instead of 100 in the division.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Sue Dunham on 2023-12-28 20:12:06
    OK, I've reproduced the gradient, this being within the 64-bit installation; I have two spectrum analyzers in the layout.

    What I did on the left was duplicate the second color from the top by selecting it, clicking "Add", and keeping the color pre-loaded into it. This shifted everything below it downward as one would expect. Then I removed that color. Things shifted back up but not all the way.

    As it happens, I like it better this way; please don't fix it too quickly and restrictively.  ;D
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-28 21:34:42
    As it happens, I like it better this way; please don't fix it too quickly and restrictively.  ;D
    I'm glad I don't have to 'fix' it  ;)  but I do plan to add a GUI to tweak the distance between the colors. The colors are currently spread evenly over the length of the gradient.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2023-12-31 16:13:21
    v0.6.0.0, 2023-12-31, Happy Newyear!

    * New: Curve visualization with customizable line width and area opacity.
    * New: The position of the custom gradient colors can be specified individually.
    * New: The color dialog can create colors with a specific opacity.
    * Improved: Added fall-back case for pre-Windows 10 1903 versions. Completely untested. Your mileage may vary.
    * Improved: Hardened the reading and writing of the configuration.
    * Improved: Various minor tweaks with focus on stability and future expandability:
      * The graph is drawn completely even when there is no track playing.
      * The peak indicators animation continues when the track stops playing or when it is paused.
      * The configuration dialog page is remembered.
    * Improved: The x axis shows labels for the complete specified frequency range.
    * Fixed: Crash when adding multiple instances to CUI (Columns User Interface) layouts.
    * Fixed: Removed background 'flash' when the element gets created.
    * Fixed: The spin controls of the Pitch setting used a wrong divider.
    * Fixed: Rewrote the handling of the spin controls to fix range checking and acceleration handling.

    You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or upgrade from within foobar2000.

    It was close but I wanted to push this out of the door before the year ended.

    (https://github.com/stuerp/foo_vis_spectrum_analyzer/blob/v0.6.0.0/Resources/Curve.png?raw=true)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2023-12-31 16:24:18
    Thank you, happy new year also to you!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-01-01 09:10:59
    The 0.6.0.0 release doesn't work on anything older than Windows 10 still, because you directly reference the function that causes problems. The compiler links the function stubs in and things break.

    Here's a replacement that allows the function to be used on any OS where it's present and not cause problems on stock Win7:
    Code: [Select]
    typedef UINT (WINAPI *GetDpiForWindow_t)(_In_ HWND hwnd);
    GetDpiForWindow_t GetDpiForWindow_w10 = NULL;

    static BOOL initGetDpiForWindow_w10()
    {
        HMODULE handle;
        if ((handle = LoadLibraryA("user32.dll")) != NULL) {
            GetDpiForWindow_w10 = (GetDpiForWindow_t)GetProcAddress(handle, "GetDpiForWindow");
        }
        if (!GetDpiForWindow_w10) {
            if (handle) FreeLibrary(handle);
        }
        return (GetDpiForWindow_w10 != NULL);
    }

    static BOOL initGetDpi()
    {
        static BOOL success = initGetDpiForWindow_w10();
        return success;
    }

    HRESULT DirectX::GetDPI(HWND hWnd, UINT & dpi) const
    {
        if (initGetDpi())
            dpi = ::GetDpiForWindow_w10(hWnd);
        else
        {
            FLOAT DPIX, DPIY;

            #pragma warning(disable: 4996)
            _Direct2D->GetDesktopDpi(&DPIX, &DPIY);
            #pragma warning(default: 4996)

            dpi = (UINT) DPIX;
        }

        return S_OK;
    }
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-01 10:22:18
    The 0.6.0.0 release doesn't work on anything older than Windows 10 still, because you directly reference the function that causes problems. The compiler links the function stubs in and things break.

    Here's a replacement that allows the function to be used on any OS where it's present and not cause problems on stock Win7:
    Code: [Select]
    typedef UINT (WINAPI *GetDpiForWindow_t)(_In_ HWND hwnd);
    GetDpiForWindow_t GetDpiForWindow_w10 = NULL;

    static BOOL initGetDpiForWindow_w10()
    {
        HMODULE handle;
        if ((handle = LoadLibraryA("user32.dll")) != NULL) {
            GetDpiForWindow_w10 = (GetDpiForWindow_t)GetProcAddress(handle, "GetDpiForWindow");
        }
        if (!GetDpiForWindow_w10) {
            if (handle) FreeLibrary(handle);
        }
        return (GetDpiForWindow_w10 != NULL);
    }

    static BOOL initGetDpi()
    {
        static BOOL success = initGetDpiForWindow_w10();
        return success;
    }

    HRESULT DirectX::GetDPI(HWND hWnd, UINT & dpi) const
    {
        if (initGetDpi())
            dpi = ::GetDpiForWindow_w10(hWnd);
        else
        {
            FLOAT DPIX, DPIY;

            #pragma warning(disable: 4996)
            _Direct2D->GetDesktopDpi(&DPIX, &DPIY);
            #pragma warning(default: 4996)

            dpi = (UINT) DPIX;
        }

        return S_OK;
    }
    Hmmm, what was I thinking... you're right. I'll release a hot-fix.

    EDIT: v0.6.0.1 should fix the fix...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Brazil2 on 2024-01-01 12:27:15
    The 0.6.0.0 release doesn't work on anything older than Windows 10 still, because you directly reference the function that causes problems. The compiler links the function stubs in and things break.
    Here's a replacement that allows the function to be used on any OS where it's present and not cause problems on stock Win7
    Hmmm, what was I thinking... you're right. I'll release a hot-fix.
    EDIT: v0.6.0.1 should fix the fix...
    Yes it works!  ;D 👍
    Thank you and happy new year to you all :)

    EDIT:
    I've noticed something strange. Look at the screenshots: B7 = 440 Hz  and A4 = 117.90 Hz :o
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Sergey77 on 2024-01-01 17:56:47
    Happy New Year everyone!

    @pqyt,
    Your component is dynamically developing and improving, it becomes the necessary element of fb2k.
    Thanks for your interesting and important component.

    Please consider this for a new version:
    -adding the graph to the toolbar

    Thank you!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-02 15:29:53
    v0.6.0.2, 2024-01-02

    * Fixed: Finally found a (the?) correct way to use the sample window duration of foobar2000.
    * Fixed: Frequency range specification when using notes.
    * Fixed: Code to determine Tooltip text.
    * Fixed: The Add button of the configuration dialog still displayed the old color dialog.

    You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or upgrade from within foobar2000.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-01-02 19:53:33
    I updated directly from 0600 to 0602, and immediately noticed different frequency bar spectrum behavior, "frantic" jerky up-and-down movement throughout the frequency range.  I had been using a 60Hz refresh rate and both smoothing options off, which gave me IMO perfect real-time looking but controlled bar behavior.  Backing the rate down to 20Hz fixed it "mostly" but still with a lack of overall smoothness that led me to roll back to 0600.  I assume this was due to the 0602 fix described as "Finally found a (the?) correct way to use the sample window duration of foobar2000"--are you sure this change was effective/necessary?  I am using Foobar 2.1 x64 and 1.6.17 with Windows 10 x64 22H2.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2024-01-02 20:01:31
    The CUI panel Full-Screen Mode doesn't work.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-02 20:13:01
    I updated directly from 0600 to 0602, and immediately noticed different frequency bar spectrum behavior, "frantic" jerky up-and-down movement throughout the frequency range.  I had been using a 60Hz refresh rate and both smoothing options off, which gave me IMO perfect real-time looking but controlled bar behavior.  Backing the rate down to 20Hz fixed it "mostly" but still with a lack of overall smoothness that led me to roll back to 0600.  I assume this was due to the 0602 fix described as "Finally found a (the?) correct way to use the sample window duration of foobar2000"--are you sure this change was effective/necessary?  I am using Foobar 2.1 x64 and 1.6.17 with Windows 10 x64 22H2.
    What FFT size are you using?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-02 20:13:42
    The CUI panel Full-Screen Mode doesn't work.
    That's because it's not implemented yet.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-01-02 20:32:37
    What FFT size are you using?
    16384
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-01-02 20:36:40
    The last two 64-bit component releases claim to be version 0.6.0.0. 32-bit dlls have the right version info.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-02 21:04:17
    What FFT size are you using?
    16384
    The sample window duration is now optimized for FFT 4096. There is a relation between the window duration and the FFT size but I haven't found it yet. Higher FFT sizes will indeed show a lot of jitter now for 'pure' signals but music tracks should be fine.
    Try setting "Smoothing" to Peak.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-02 21:07:13
    The last two 64-bit component releases claim to be version 0.6.0.0. 32-bit dlls have the right version info.
    Huh?

    FILE HEADER :

       Machine:                         8664h (AMD64 (K8))
       Number of Sections:              0006h
       Time Date Stamp:                 659429ACh  -> 02/01/2024  16:20:12 
       Symbols Pointer:                 00000000h
       Number Of Symbols:               00000000h
       Size Of Optional Header:         00F0h
       Flags:                           2022h

    Version language : English (United States)
          FileVersion   : 0.6.0.2
          FileDescription   : A spectrum analyzer for foobar2000
          LegalCopyright   : Copyright (c) 2023-2024 P. Stuer. All rights reserved.
          LegalTrademarks   :
          Comments   :
          CompanyName   :
          InternalName   : Spectrum Analyzer
          OriginalFilename   : foo_vis_spectrum_analyzer.dll
          ProductName   : Spectrum Analyzer
          ProductVersion   : 0.6.0.2

    Creation Date   : 02/01/2024  22:09:30
    Last Modif. Date   : 02/01/2024  16:20:12
    Last Access Date   : 02/01/2024  22:09:30
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2024-01-02 21:49:11
    Download 0.6.0.2:
    Quote
    foo_vis_spectrum_analyzer 0.6.0.0
    Copyright (c) 2023 P. Stuer. All rights reserved.

    A spectrum analyzer for foobar2000
    Based on the Audio Spectrum project (https://codepen.io/TF3RDL/pen/poQJwRW)

    Built with foobar2000 SDK 20230923
    on Dec 31 2023 16:55:48.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-01-03 07:21:15
    The last two 64-bit component releases claim to be version 0.6.0.0. 32-bit dlls have the right version info.
    Huh?
    He means that the 0602 release shows up in the Foobar 2.1 x64 component list as 0600 (confirmed).  The dll itself is correctly tagged as 0602.

    BTW, with my own issue I did try changing the FFT to 4096 (and smoothing has always been set to "peak"), and the jitter is still way obvious to me even at 20/30 refresh compared to the smooth action of version 0600 at FFT 16384 and 60Hz refresh, so I will be sticking with 0600 for the time being.  For me it is at a "completed" stage there, and I thank you for such a beautiful spectrum.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-03 09:20:47
    The last two 64-bit component releases claim to be version 0.6.0.0. 32-bit dlls have the right version info.
    Huh?
    He means that the 0602 release shows up in the Foobar 2.1 x64 component list as 0600 (confirmed).  The dll itself is correctly tagged as 0602.
    Download 0.6.0.2:
    Quote
    foo_vis_spectrum_analyzer 0.6.0.0
    Copyright (c) 2023 P. Stuer. All rights reserved.

    A spectrum analyzer for foobar2000
    Based on the Audio Spectrum project (https://codepen.io/TF3RDL/pen/poQJwRW)

    Built with foobar2000 SDK 20230923
    on Dec 31 2023 16:55:48.
    Something else must be wrong. All version information derive from 1 set of defines. Are you sure the DLL is replaced in your foobar2000 profile? Both 32 and 64-bits show up correctly on 3 different system here.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2024-01-03 09:37:05
    Investigated the 64 bit dll:

    Quote
    €           À      F耠  €Q €   €S €   €\ €   p\ €   À€   PP €   @P €   p €   °p €   àp €   ðq €   ¨Ù,âÜŸí C Uù¸€   œa €   @P €   p €   °p €   ðW €    \ €   G"PoZF’E‹ý;`8€   Ðv €   Spectrum Analyzer       foo_vis_spectrum_analyzer.dll   foo_vis_spectrum_analyzer 0.6.0.0
    Copyright (c) 2023 P. Stuer. All rights reserved.

    A spectrum analyzer for foobar2000
    Based on the Audio Spectrum project (https://codepen.io/TF3RDL/pen/poQJwRW)

    Built with foobar2000 SDK 20230923
    on Dec 31 2023 16:55:48.        0.6.0.0 forced cast failure     À$€   }¦€   }¦€   }¦€   }¦€   €#€   𸠀   𸠀    ¹ €   0¸ €   p\ €   h €   𸠀   𸠀   `» €    · €   з €   ð· €   ¸ €   ˜&€   @¸ €   è'€   €¹ €   (€   °º €   ¨'€   𸠀   𸠀   0º €    · €           ¼  ¾  Æ  È
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Brazil2 on 2024-01-03 15:20:10
    v0.6.0.2, 2024-01-02
    * Fixed: Frequency range specification when using notes.
    It doesn't work for me, A4 is still 117.90 Hz and B7 440 Hz :(
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2024-01-03 15:29:39
    Are you using 64 bit? It claims to be 0.6.0.0 instead of 0.6.0.2
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Brazil2 on 2024-01-03 17:42:22
    Are you using 64 bit? It claims to be 0.6.0.0 instead of 0.6.0.2
    Yes, I'm using the 64-bit version and in the installed components list I see version 0.6.0.0, however in the foo_vis_spectrum_analyzer component folder it's the correct version 0.6.0.2 DLL.
    But what has this to do with frequencies and notes ?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-03 17:42:58
    Are you using 64 bit? It claims to be 0.6.0.0 instead of 0.6.0.2
    Can you try unzipping the package and copying the 64-bit DLL manually to your profile, please?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-01-03 17:49:57
    Something else must be wrong. All version information derive from 1 set of defines. Are you sure the DLL is replaced in your foobar2000 profile? Both 32 and 64-bits show up correctly on 3 different system here.
    Yes the dll was replaced in profile/user-components-x64 with the version showing 0602 in its properties and sigcheck and the jittery performance, but showed as 0600 in the Foobar components list.  This was after using the auto-update feature to update.  Actually I did that twice, because after the component list version still showed 0600 I thought I hadn't hit "OK" or something so did the update again from a backup copy.  Maybe there is something wrong with the zip file updater that isn't passing all the info to Foobar.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2024-01-03 18:10:49
    Are you using 64 bit? It claims to be 0.6.0.0 instead of 0.6.0.2
    Can you try unzipping the package and copying the 64-bit DLL manually to your profile, please?
    Done, believe me it claims 0.6.0.0 and is possibly 0.6.0.0.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-01-03 18:14:31
    @pqyt - just open the Components page in Preferences and see the version info and about page. The component says it's 0.6.0.0. Only the resource manifest speaks about 0.6.0.2.

    And before I reported it to you I had verified that the same bug affects both the binary on component repository and on github.

    And it's not a bug in sources as my compile correctly reports 0.6.0.2.

    Edit: though I tweak your solution settings to suit my structure and I skip your complex powershell archiving script. I haven't tried to understand what it does.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-03 18:25:56
    @pqyt - just open the Components page in Preferences and see the version info and about page. The component says it's 0.6.0.0. Only the resource manifest speaks about 0.6.0.2.

    And before I reported it to you I had verified that the same bug affects both the binary on component repository and on github.

    And it's not a bug in sources as my compile correctly reports 0.6.0.2.

    Edit: though I tweak your solution settings to suit my structure and I skip your complex powershell archiving script. I haven't tried to understand what it does.
    OK. I rebuilt 0.6.0.2 as is and re-uploaded it to the components repository. Only the description is wrong. For better or for worse, it is 0.6.0.2. I don't know what went wrong during the initial release.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-03 18:29:10
    @pqyt - just open the Components page in Preferences and see the version info and about page. The component says it's 0.6.0.0. Only the resource manifest speaks about 0.6.0.2.

    And before I reported it to you I had verified that the same bug affects both the binary on component repository and on github.

    And it's not a bug in sources as my compile correctly reports 0.6.0.2.

    Edit: though I tweak your solution settings to suit my structure and I skip your complex powershell archiving script. I haven't tried to understand what it does.
    Yeah... I have tunnel vision. My own production foobar is still 32-bit and it was fine. My development foobars get the component during the build. Maybe I should take a break...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Brazil2 on 2024-01-03 21:22:33
    I have installed the updated build and it's now showing as version 0.6.0.2 in the components list, but the A4@117.90 Hz and B7@440 Hz issue is still there :(
    Title: Re: foo_vis_spectrum_analyzer
    Post by: kenzzy on 2024-01-03 23:36:22
    Thanks for your great works!
    This is long-awaited component for me.
    And, please add left and right reversed setting to x-axis
     for displaying left and right channel side by side.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-01-04 02:18:45
    And, please add left and right reversed setting to x-axis
     for displaying left and right channel side by side.
    Me too as I haven't (and someone else) able to find the channel spectrum visualization for Default UI that it is compatible with foobar2000 x64 v2.x

    I've already have side-by-side channel visualization mode (Visualization type = separate) on my own Channel Spectrum panel remake on Web Audio API as a CodePen project (https://codepen.io/TF3RDL/pen/NWBYeaE) a long-time ago after realizing that there are people who wanting to see a 64-bit remake of foo_uie_vis_channel_spectrum, so I've added that to aforementioned CodePen project and renamed this project from "Overlayed channel spectrum + custom FFT" to just "Channel spectrum + custom FFT", and another FR: more frequency distribution mode as in the aforementioned CodePen project (which have similar behavior to Classic Spectrum Analyzer (vis_classic) plugin for Winamp as well as Channel Spectrum panel (foo_uie_vis_channel_spectrum) component for foobar2000 as I've realized that Channel Spectrum panel frequency scaling depends on the FFT size and actual number of bands rather than a true Mel scale)

    BTW, I've noticed that my own Web Audio API visualizations especially ones involving simultaneous channel visualizations only react to the Front part of the surround sound, though the mono (one AnalyserNode that connected to the audio source before ChannelSplitterNode) visualization reacts to everything except LFE channels per specifications for the channelInterpretation="speakers" behavior when comes to downmixing (https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#audio_channels), which you can test it by putting a surround sound (or anything more than 2 channels) audio file into the visualizer
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-01-04 05:32:46
    The sample window duration is now optimized for FFT 4096. There is a relation between the window duration and the FFT size but I haven't found it yet. Higher FFT sizes will indeed show a lot of jitter now for 'pure' signals but music tracks should be fine.
    I might be found a relation between window duration (or more accurately, the value of the last argument "requested_length" of get_chunk_absolute() function, which I believe that argument is measured in seconds rather than samples I've thought, hence the length of the chunk in samples depends on the sample rate even if the value of this argument is the same) and FFT size, which is usually measured in samples, it is "fftSize / sampleRate" for the actual length in seconds and hopefully, the sample window duration can be optimized for all window durations (including 65536-samples and above FFT)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: darkflame23 on 2024-01-04 14:37:43
    Had another look at this, it's getting there, well done with all the hard work.

    In order to fully replace Musical Spectrum for me, it'll need the ability to turn off all axis text and lines, so just the main graphic display with no text etc. For full screen I like the axes and text, but when it's smaller as part of a main layout I like to just see the graphics. Forgive me if this is already implemented and I missed it!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-04 15:39:13
    Had another look at this, it's getting there, well done with all the hard work.

    In order to fully replace Musical Spectrum for me, it'll need the ability to turn off all axis text and lines, so just the main graphic display with no text etc. For full screen I like the axes and text, but when it's smaller as part of a main layout I like to just see the graphics. Forgive me if this is already implemented and I missed it!
    Set the X axis and Y axis to mode "None". Is that what you were looking for?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: darkflame23 on 2024-01-04 16:17:39
    Had another look at this, it's getting there, well done with all the hard work.

    In order to fully replace Musical Spectrum for me, it'll need the ability to turn off all axis text and lines, so just the main graphic display with no text etc. For full screen I like the axes and text, but when it's smaller as part of a main layout I like to just see the graphics. Forgive me if this is already implemented and I missed it!
    Set the X axis and Y axis to mode "None". Is that what you were looking for?

    Sorted, thank you!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2024-01-04 21:01:10
    Request: Spectrum Analyzer Configuration window in dark mode.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: foobrik on 2024-01-05 10:50:00
    Request: Spectrum Analyzer Configuration window in dark mode.
    +
    Title: Re: foo_vis_spectrum_analyzer
    Post by: darkflame23 on 2024-01-06 15:49:18
    New line mode looks great.

    A slope control would be nice. I usually have my frequency analysers (SPAN or Prism) set to 3, 4.5 or 6dB slope towards the highs to read "flatter".
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-07 17:10:06
    A slope control would be nice. I usually have my frequency analysers (SPAN or Prism) set to 3, 4.5 or 6dB slope towards the highs to read "flatter".
    Do you have any documentation or articles I can read because I don't understand what you're asking?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-07 17:15:45
    Work in progress: Curve with album art and dynamically created gradient

    (https://raw.githubusercontent.com/stuerp/foo_vis_spectrum_analyzer/vNext/Resources/CurveWithBackground.png)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: darkflame23 on 2024-01-07 18:47:11
    A slope control would be nice. I usually have my frequency analysers (SPAN or Prism) set to 3, 4.5 or 6dB slope towards the highs to read "flatter".
    Do you have any documentation or articles I can read because I don't understand what you're asking?

    A standard analyser with no slope/weighting will make White Noise look "flat", but most musical program signals follow something closer to a Pink Noise spectrum (a 3dB per octave roll off) or even more. Music on standard analysers will always show more level in the bass than looks natural. More advanced analysers will have a dB slope control where you can adjust it to your liking. I'd highly recommend downloading Voxengo SPAN and TDR Prism (both free plugins), having a play, and reading their manuals to understand it a bit better. Prism is state of the art (I was on the beta team).

    https://www.voxengo.com/product/span/

    https://www.tokyodawn.net/tdr-prism/

    The Prism manual explains it really well:

    https://docs.tokyodawn.net/tdr-prism-manual/#Analyzer_Weighting
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-07 18:54:57
    A slope control would be nice. I usually have my frequency analysers (SPAN or Prism) set to 3, 4.5 or 6dB slope towards the highs to read "flatter".
    Do you have any documentation or articles I can read because I don't understand what you're asking?

    A standard analyser with no slope/weighting will make White Noise look "flat", but most musical program signals follow something closer to a Pink Noise spectrum (a 3dB per octave roll off) or even more. Music on standard analysers will always show more level in the bass than looks natural. More advanced analysers will have a dB slope control where you can adjust it to your liking. I'd highly recommend downloading Voxengo SPAN and TDR Prism (both free plugins), having a play, and reading their manuals to understand it a bit better. Prism is state of the art (I was on the beta team).

    https://www.voxengo.com/product/span/

    https://www.tokyodawn.net/tdr-prism/
    Will do. Thx.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2024-01-07 19:46:07
    I saw it in waveform minibar (mod): Tooltip on_mouse_lbtn_down. The on_mouse_move tooltip is a little bit annoying and is buggy. Thanks for patience.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-01-08 00:29:55
    A slope control would be nice. I usually have my frequency analysers (SPAN or Prism) set to 3, 4.5 or 6dB slope towards the highs to read "flatter".
    Do you have any documentation or articles I can read because I don't understand what you're asking?

    A standard analyser with no slope/weighting will make White Noise look "flat", but most musical program signals follow something closer to a Pink Noise spectrum (a 3dB per octave roll off) or even more. Music on standard analysers will always show more level in the bass than looks natural. More advanced analysers will have a dB slope control where you can adjust it to your liking. I'd highly recommend downloading Voxengo SPAN and TDR Prism (both free plugins), having a play, and reading their manuals to understand it a bit better. Prism is state of the art (I was on the beta team).

    https://www.voxengo.com/product/span/

    https://www.tokyodawn.net/tdr-prism/

    The Prism manual explains it really well:

    https://docs.tokyodawn.net/tdr-prism-manual/#Analyzer_Weighting
    Also, I've already implemented the weighting functions, frequency tilting, and even ones derived from Winamp's Classic Spectrum Analyzer plugin here (https://codepen.io/TF3RDL/pen/poQJwRW)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2024-01-10 03:58:55
    Glitch: Play -> Pause -> Stop. Spectrum Analyzer is not resettet.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-10 07:34:41
    Glitch: Play -> Pause -> Stop. Spectrum Analyzer is not resettet.
    Thx. Fixed in the next version.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-10 07:35:56
    I saw it in waveform minibar (mod): Tooltip on_mouse_lbtn_down. The on_mouse_move tooltip is a little bit annoying and is buggy. Thanks for patience.
    OK if I implement this with Advanced Settings? IMHO it is not expected behavior.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-10 10:32:05
    I have installed the updated build and it's now showing as version 0.6.0.2 in the components list, but the A4@117.90 Hz and B7@440 Hz issue is still there :(
    I can't reproduce this. Which settings are you using? Are you using high DPI settings?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Brazil2 on 2024-01-10 21:56:30
    Which settings are you using?




    Are you using high DPI settings?
    No. Default 100%.


    MOD edit: modify attachment links
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Black Lotus 974 on 2024-01-11 17:28:48
    Hi, I'm having 2 issues with your plugin :
    - Using it in fb2k x64 crashes, so I revert back to x32 and it works. I see that your changelog on 0.6 have the mention of "Fixed: Crash when adding multiple instances to CUI (Columns User Interface) layouts." Maybe with this fix it could be fix my setup but I need to retry later the installation of the x64 fb2k.
    - When I double click on the panel to show me in fullscreen, the screen remains black and nothing appears but if I right click I see that's the panel because it shows me the context menu. Has it been reported by other people ?

    Regards.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-11 18:25:51
    Hi, I'm having 2 issues with your plugin :
    - Using it in fb2k x64 crashes, so I revert back to x32 and it works. I see that your changelog on 0.6 have the mention of "Fixed: Crash when adding multiple instances to CUI (Columns User Interface) layouts." Maybe with this fix it could be fix my setup but I need to retry later the installation of the x64 fb2k.
    Make sure you use the latest version. It's been a while that a crash has been reported.
    - When I double click on the panel to show me in fullscreen, the screen remains black and nothing appears but if I right click I see that's the panel because it shows me the context menu. Has it been reported by other people ?
    What settings are you using? Is a track playing? Do any of the axis appear? A completely black screen has never been reported.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-12 10:19:58
    Hi,

    How can I make the background transparent?
    In settings you can specify background color which works fine and also set alpha which does nothing which confuses me.

    How can I set foo_vis_spectrum_analyzer to the same pseudo behavior as the old foo_ui_vis_channel_spectrum?

    For reference I attached a screenshot with an old channel spectrum with gradient and art as background ...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-12 22:44:15
    How can I make the background transparent?
    In settings you can specify background color which works fine and also set alpha which does nothing which confuses me.
    The background color is transparent but the panel itself is not a layered window. What's behind the panel?
    How can I set foo_vis_spectrum_analyzer to the same pseudo behavior as the old foo_ui_vis_channel_spectrum?
    Define 'pseudo behavior'
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-12 23:36:25
    How can I make the background transparent?
    In settings you can specify background color which works fine and also set alpha which does nothing which confuses me.
    The background color is transparent but the panel itself is not a layered window. What's behind the panel?
    How can I set foo_vis_spectrum_analyzer to the same pseudo behavior as the old foo_ui_vis_channel_spectrum?
    Define 'pseudo behavior'

    Plugins like yours live in a CUI PSS panel in my skin, which has pseudo transparancy enabled. In the PSS code for that particular splitter I paint the background with a gradient and display the art I want to see. Per plugin I can choose between whether I want to display from a selection of two different bandlogo's, recordlabelogo, artistcountryflag, albumcover or a selection of artistpics. After the background and art are displayed I activate the plugin.
    Some old plugins (Waveseekbar, VU Meter and Peakmeter do not support pseudo transparancy). Other old plugins do support pseudo like ELP, ESP, Channel Spectrum, Lyrics3 and all WSH scripts. Almost all modern plugins do support pseudo transparency. For instance all Will-B scripts do (spidermonkey) and YT. JS3 doesn't support pseudo out of the box but it's quite easy to disable one line of code (where it paints the background of it's location) which will activate pseudo. Unfortunately that has to be done everytime a new version pops up.

    So, although I'm quite happy with the way the old Channel Spectrum looks operating in pseudomode it's not supported anymore. Therefore I wanted to give your new plugin a shot now it's seems to be stable. I also saw you are working on implementing painting art yourself in your plugin. I prefer to do that myself, but need pseudo support (eg the plugin has an option not to display background).



    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-13 07:50:16
    How can I make the background transparent?
    In settings you can specify background color which works fine and also set alpha which does nothing which confuses me.
    The background color is transparent but the panel itself is not a layered window. What's behind the panel?
    How can I set foo_vis_spectrum_analyzer to the same pseudo behavior as the old foo_ui_vis_channel_spectrum?
    Define 'pseudo behavior'

    Plugins like yours live in a CUI PSS panel in my skin, which has pseudo transparancy enabled. In the PSS code for that particular splitter I paint the background with a gradient and display the art I want to see. Per plugin I can choose between whether I want to display from a selection of two different bandlogo's, recordlabelogo, artistcountryflag, albumcover or a selection of artistpics. After the background and art are displayed I activate the plugin.
    Some old plugins (Waveseekbar, VU Meter and Peakmeter do not support pseudo transparancy). Other old plugins do support pseudo like ELP, ESP, Channel Spectrum, Lyrics3 and all WSH scripts. Almost all modern plugins do support pseudo transparency. For instance all Will-B scripts do (spidermonkey) and YT. JS3 doesn't support pseudo out of the box but it's quite easy to disable one line of code (where it paints the background of it's location) which will activate pseudo. Unfortunately that has to be done everytime a new version pops up.

    So, although I'm quite happy with the way the old Channel Spectrum looks operating in pseudomode it's not supported anymore. Therefore I wanted to give your new plugin a shot now it's seems to be stable. I also saw you are working on implementing painting art yourself in your plugin. I prefer to do that myself, but need pseudo support (eg the plugin has an option not to display background).
    I haven't spent any time with Columns UI so 'pseudo transparency' is new to me. And frankly, it sounds a bit weird. Either something is transparent, supports alpha blending or is opaque, nothing pseudo about it. From your explanation could it be that when you talk about 'scripts' that they just render to an existing window while 'old' plugins and mine create their own (child) window and have to rely on the Windows transparency rules? I'll have to revisit old code of mine because I gave up on window transparency when Microsoft changed their mind and implementation rules with every new Windows version since XP.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-13 09:22:19
    I haven't spent any time with Columns UI so 'pseudo transparency' is new to me. And frankly, it sounds a bit weird. Either something is transparent, supports alpha blending or is opaque, nothing pseudo about it. From your explanation could it be that when you talk about 'scripts' that they just render to an existing window while 'old' plugins and mine create their own (child) window and have to rely on the Windows transparency rules? I'll have to revisit old code of mine because I gave up on window transparency when Microsoft changed their mind and implementation rules with every new Windows version since XP.

    In my opinion the 'pseudo' term is a bit weird. If you enable pseudo in CUI PSS panels you can use alpha blending in every bit of code or plugins that live in this panel.

    So what I'm asking of you is to paint the background in your plugin with the alpha settings that are set in your configuration panel. I'll just set it to fully transparant so it doesn't conflict with how I painted the background (with gradient and art).

    See the attached screenshot. Old Channel Spectrum on top of how I painted the background and art and your plugin who repaints on top of my background and art.



    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-13 09:33:09
    This is the config of old Channel Spectrum. I just have to enable Transparant background and I'm all set.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-01-13 11:00:43
    You're grossly over-simplifying what it takes. You don't just avoid drawing a background colour and have the parent auto-magically shine through.

    There is a one line helper in the CUI SDK which makes it easy enough for GDI users because it takes an HDC arg...

    https://github.com/reupen/columns_ui-sdk/blob/fddba5e0f6fade23785fe03af75a027d70802721/win32_helpers.h#L79

    I can also use it in JSP3 because I'm using a D2D1 DC render target. Might be more work for this component because I searched and found it uses HWND render targets.

    edit: almost forgot, my CUI get_window_config has the 2nd arg set to true like this...

    Code: [Select]
    		uie::container_window_v3_config get_window_config() final
    {
    return { L"jsp_class_cui_toolbar", true, CS_DBLCLKS };
    }
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-13 11:49:41
    Which settings are you using?
    Are you using high DPI settings?
    No. Default 100%.
    MOD edit: modify attachment links
    @Brazil2, thx. I see what's wrong. I forgot to take non-standard Bands per Octave values into account. Fixed in the next version.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-01-13 12:30:06
    I see what's wrong. I forgot to take non-standard Bands per Octave values into account. Fixed in the next version.
    BTW, on my own spectrum visualization (https://codepen.io/TF3RDL/pen/poQJwRW), the number of bands per-octave can be a noninteger value but the actual number of bands is still an integer (which does makes sense after all), and the number of bands on other modes can't be noninteger (or in other words, can only be any integer value)

    And for anyone with some kind of DSP knowledge, are switching away from Goertzel algorithm (good enough for DTMF tone detection, but it gets very slow with large number of bands and long window sizes) to sliding DFT for the Constant-Q Transform (CQT) mode worth the drawbacks (e.g. no window functions other than cosine sums unless you apply the kernel windowing (https://www.zafarrafii.com/Documents/Journals/Rafii%20-%20Sliding%20Discrete%20Fourier%20Transform%20with%20Kernel%20Windowing%20-%202018.pdf) technique)?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-13 13:55:06
    Which settings are you using?
    Are you using high DPI settings?
    No. Default 100%.
    MOD edit: modify attachment links
    @Brazil2, thx. I see what's wrong. I forgot to take non-standard Bands per Octave values into account. Fixed in the next version.
    More precise: the frequency number is correct but the note name is wrong.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: metal_termite on 2024-01-13 14:47:42
    Is there a way to customize the following:

    1. set a distinct color just for the line (curve)?
    2. set a distinct color just for the peaks (bars)?
    3. set bars thickness?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-13 15:08:36
    Is there a way to customize the following:

    1. set a distinct color just for the line (curve)?
    2. set a distinct color just for the peaks (bars)?
    3. set bars thickness?
    1. No. It currently is the last color in the gradient.
    2. No. Fade out uses white. The other modes use the gradient color of the peak value.
    3. The thickness is determined by the number of bands parameter or by the selected note range and bands per octave in the Frequencies section.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-13 17:14:07
    You're grossly over-simplifying what it takes. You don't just avoid drawing a background colour and have the parent auto-magically shine through.

    There is a one line helper in the CUI SDK which makes it easy enough for GDI users because it takes an HDC arg...

    https://github.com/reupen/columns_ui-sdk/blob/fddba5e0f6fade23785fe03af75a027d70802721/win32_helpers.h#L79

    I can also use it in JSP3 because I'm using a D2D1 DC render target. Might be more work for this component because I searched and found it uses HWND render targets.

    edit: almost forgot, my CUI get_window_config has the 2nd arg set to true like this...

    Code: [Select]
    		uie::container_window_v3_config get_window_config() final
    {
    return { L"jsp_class_cui_toolbar", true, CS_DBLCLKS };
    }
    It seems to be possible with a custom swap chain. I don't say no but not now. I want to finished some other features I'm working on.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-13 17:15:42
    v0.6.0.3, 2024-01-13

    * Improved: The sample window size for the FFT is now calculated based on the sample rate and the FFT size.
    * Fixed: The spectrum was not cleared after stopping a paused track.
    * Fixed: Wrong note names in the tooltip when using a non-default number of bands per octave..

    You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or upgrade from within foobar2000.

    Just a quick bug fix release because the new features are far from done yet.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Brazil2 on 2024-01-13 17:41:31
    v0.6.0.3, 2024-01-13
    * Fixed: Wrong note names in the tooltip when using a non-default number of bands per octave.
    Thanks!
    Much better, but look at the screenshots.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-13 18:41:37
    You're grossly over-simplifying what it takes. You don't just avoid drawing a background colour and have the parent auto-magically shine through.

    There is a one line helper in the CUI SDK which makes it easy enough for GDI users because it takes an HDC arg...

    https://github.com/reupen/columns_ui-sdk/blob/fddba5e0f6fade23785fe03af75a027d70802721/win32_helpers.h#L79

    I can also use it in JSP3 because I'm using a D2D1 DC render target. Might be more work for this component because I searched and found it uses HWND render targets.

    edit: almost forgot, my CUI get_window_config has the 2nd arg set to true like this...

    Code: [Select]
    		uie::container_window_v3_config get_window_config() final
    {
    return { L"jsp_class_cui_toolbar", true, CS_DBLCLKS };
    }
    It seems to be possible with a custom swap chain. I don't say no but not now. I want to finished some other features I'm working on.

    I'm patient :-)

    Edit: 0.6.0.3 changes something in the alppha part.
    When set to 0% alpha background will turn completely black (0-0-0). When set to 100% alpha it is the colour I selected but opaque as expected.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2024-01-13 18:59:06
    It seems, you have the bars mode. So you have to untick bar background
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-13 19:07:37
    It seems, you have the bars mode. So you have to untick bar background

    Correct, but when switched to curve same behavior regarding alpha. So in version 0.6.0.3 0% gives black background and 100% paint the color I selected in the config page, while in 0.6.0.2 it just gives the opaque background in the selected color.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-13 21:28:28
    v0.6.0.3, 2024-01-13
    * Fixed: Wrong note names in the tooltip when using a non-default number of bands per octave.
    Thanks!
    Much better, but look at the screenshots.
    What do you expect? A4.313? There are 2 bars near 440Hz so they both appear as A4.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2024-01-13 21:44:55
    20 bands per octave? An octave has 12 semitones. Are you fan of microtonal music?

    In microtonal music the unit is Cent. An octave is 1200 Cent. Each semitone is +100  Cent, quartertone is +50 Cent. In your case of 20 tones per octave, this should be labeled +60 Cent per tone.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-13 22:23:06
    20 bands per octave? An octave has 12 semitones. Are you fan of microtonal music?

    In microtonal music the unit is Cent. An octave is 1200 Cent. Each semitone is +100  Cent, quartertone is +50 Cent. In your case of 20 tones per octave, this should be labeled +60 Cent per tone.
    I don't mind adding that sub-unit but... I hope everybody understands we're using an audio player not a science experiment ;-)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-01-14 03:24:52
    20 bands per octave? An octave has 12 semitones. Are you fan of microtonal music?

    In microtonal music the unit is Cent. An octave is 1200 Cent. Each semitone is +100  Cent, quartertone is +50 Cent. In your case of 20 tones per octave, this should be labeled +60 Cent per tone.
    I don't mind adding that sub-unit but... I hope everybody understands we're using an audio player not a science experiment ;-)
    Since unlike the original foo_musical_spectrum, the number of bands per-octave can be set to anything other than 12, and the frequency band distribution mode can be set to other than octave bands (including the frequency scales other than logarithmic), a "Nearest note: (insert note name here)" would make sense since on 1/24th octave spectrum, we have two A4s instead of one

    * Improved: The sample window size for the FFT is now calculated based on the sample rate and the FFT size.
    This should also account for resampling DSPs (especially extreme ones like when the source material is at 48kHz sample rate and the resampling DSP's target rate is 8kHz), which obviously affects all visualizations since visualization stream API gathers data after all DSP effects right?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Brazil2 on 2024-01-14 09:42:10
    20 bands per octave? An octave has 12 semitones.
    I've even increased it to 24 because it looks better to my eyes, otherwise the bars are too large ;)


    In your case of 20 tones per octave, this should be labeled +60 Cent per tone.
    That or no note label at all if the frequency doesn't match with a real note.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-14 11:52:32
    This should also account for resampling DSPs (especially extreme ones like when the source material is at 48kHz sample rate and the resampling DSP's target rate is 8kHz), which obviously affects all visualizations since visualization stream API gathers data after all DSP effects right?
    I use the sample rate as reported by an audio chunk once they start coming in. Before that, it's a guestimate based on what the track reports in its metadata. For synthesized tracks the sample rate starts at 44100.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Black Lotus 974 on 2024-01-14 18:59:09
    - When I double click on the panel to show me in fullscreen, the screen remains black and nothing appears but if I right click I see that's the panel because it shows me the context menu. Has it been reported by other people ?
    What settings are you using? Is a track playing? Do any of the axis appear? A completely black screen has never been reported.

    Hi, this is the panel into my fb2k and when I double click on the panel. As you can see it seems I can do right click but nothing is showed. There is 2 windows : the fb2k window which shows me that spectrum is displayed in the thumb, and the plugin window which shows me a black screen.
    I have a dual screen, is it supposed to be an issue for displaying in fullscreen ?
    I made screenshots of the configuration
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-01-14 21:30:16
    I use the sample rate as reported by an audio chunk once they start coming in. Before that, it's a guestimate based on what the track reports in its metadata. For synthesized tracks the sample rate starts at 44100.
    Fair enough, this trick is also used on foo_enhanced_spectrum_analyzer (https://hydrogenaud.io/index.php/topic,115912.0.html) component by @Crossover to make up for the fact the requested_length argument of get_chunk_absolute() function is in seconds rather than samples, so if the requested_length is 0.1, the chunk we get is 4800 samples (on 48kHz sample rate) long and it becomes obvious at low framerate (100ms or higher refresh interval) and applying the resampling DSPs (this includes Set Sample Rate effect from foo_dsp_utility by @Peter )

    Also, two FRs: Reaction alignment parameter (like in Vizzy.io) that controls the delay between actual playback and the visualization, setting to negative one means all of samples are ahead the actual playback (with the first sample is equal to the actual playback), setting to zero means the first half of samples are behind the actual playback and latter half are ahead of it (just like original foo_musical_spectrum and basically any get_spectrum_absolute() visualizations), and setting it to positive one means all of samples are behind the playback (similar to VST audio analyzer plugins like Voxengo SPAN) with the last sample is equal to the actual playback

    And make cutoff at Nyquist frequency toggleable via a checkbox named something like "Suppress mirror image" in configuration window (and probably Nyquist label, which is placed at the sample rate divided by two) since on my own spectrum analyzer (https://codepen.io/TF3RDL/pen/poQJwRW), the mirror image of the spectrum is visualized at anything above Nyquist
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-01-15 10:04:24
    It seems to be possible with a custom swap chain.

    Not sure if it would work for this but I need to use DrawThemeBackground in my own code and it's done like this...

    a) adjusting your D2D1::RenderTargetProperties with D2D1_RENDER_TARGET_USAGE set to D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE

    b) a bit of code like

    Code: [Select]
    HDC dc{};

    // I use microsoft/wil, could be pfc from the fb2k SDK or whatever
    wil::com_ptr_t<ID2D1GdiInteropRenderTarget> gdi;
    if SUCCEEDED(render_target->QueryInterface(IID_PPV_ARGS(&gdi)))
    {
    if SUCCEEDED(gdi->GetDC(D2D1_DC_INITIALIZE_MODE_COPY, &dc))
    {
    // do stuff with dc here
    gdi->ReleaseDC(nullptr);
    }
    }
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-15 10:29:09
    It seems to be possible with a custom swap chain.

    Not sure if it would work for this but I need to use DrawThemeBackground in my own code and it's done like this...

    a) adjusting your D2D1::RenderTargetProperties with D2D1_RENDER_TARGET_USAGE set to D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE

    b) a bit of code like

    Code: [Select]
    HDC dc{};

    // I use microsoft/wil, could be pfc from the fb2k SDK or whatever
    wil::com_ptr_t<ID2D1GdiInteropRenderTarget> gdi;
    if SUCCEEDED(render_target->QueryInterface(IID_PPV_ARGS(&gdi)))
    {
    if SUCCEEDED(gdi->GetDC(D2D1_DC_INITIALIZE_MODE_COPY, &dc))
    {
    // do stuff with dc here
    gdi->ReleaseDC(nullptr);
    }
    }
    The whole point was to create a component without any GDI. Direct2D was released in 2006 . It's way past time to move on. I'll try the swap chain route first.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-01-15 11:07:32
    Cool. I'll look out for it and maybe I can modernise mine. I'm generally too stupid to do much myself. :P
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-17 11:18:58
    @marc2k3,

    Cool. I'll look out for it and maybe I can modernise mine. I'm generally too stupid to do much myself. :P
    Here is a working example (https://github.com/stuerp/Compositing) for a desktop window.  Now I need to see it also works with a child window of foobar2000.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-01-17 13:24:22
    Thanks, I'll take a look at that tonight.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: metal_termite on 2024-01-18 21:03:43
    I appreciate the time you took to make this plugin. I'm not really a power user anymore so forgive me if there's an obvious answer to these questions/concerns/comments:

    1. Shouldn't the configuration window be honoring the user selected dark/light mode?
    2. Wishlist (feature request):
      2A. Please consider adding the option to save multiple configurations. It would be nice to quickly switch between them.
      2B. Peak mode for curve type
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-19 05:27:10
    @metal_termite ,

    1. Shouldn't the configuration window be honoring the user selected dark/light mode?
    Yes, but I ran into problems with the standard way of implementing this because the dialog is not a foobar2000 settings page. I'll go back to it later.
      2A. Please consider adding the option to save multiple configurations. It would be nice to quickly switch between them.
    Already on the To Do list.
      2B. Peak mode for curve type
    Noted.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: mip52 on 2024-01-19 13:36:09
    And, please add left and right reversed setting to x-axis
     for displaying left and right channel side by side.
    Me too as I haven't (and someone else) able to find the channel spectrum visualization for Default UI that it is compatible with foobar2000 x64 v2.x

    I've already have side-by-side channel visualization mode (Visualization type = separate) on my own Channel Spectrum panel remake on Web Audio API as a CodePen project (https://codepen.io/TF3RDL/pen/NWBYeaE) a long-time ago after realizing that there are people who wanting to see a 64-bit remake of foo_uie_vis_channel_spectrum, so I've added that to aforementioned CodePen project and renamed this project from "Overlayed channel spectrum + custom FFT" to just "Channel spectrum + custom FFT", and another FR: more frequency distribution mode as in the aforementioned CodePen project (which have similar behavior to Classic Spectrum Analyzer (vis_classic) plugin for Winamp as well as Channel Spectrum panel (foo_uie_vis_channel_spectrum) component for foobar2000 as I've realized that Channel Spectrum panel frequency scaling depends on the FFT size and actual number of bands rather than a true Mel scale)

    BTW, I've noticed that my own Web Audio API visualizations especially ones involving simultaneous channel visualizations only react to the Front part of the surround sound, though the mono (one AnalyserNode that connected to the audio source before ChannelSplitterNode) visualization reacts to everything except LFE channels per specifications for the channelInterpretation="speakers" behavior when comes to downmixing (https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Basic_concepts_behind_Web_Audio_API#audio_channels), which you can test it by putting a surround sound (or anything more than 2 channels) audio file into the visualizer

    Hi,
    I'd also like to have X-axis and Y-axis mirroring ;-)
    thanks a lot for your work!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-19 16:03:37
    Hi,
    I'd also like to have X-axis and Y-axis mirroring ;-)
    thanks a lot for your work!
    Dynamic gradients are nearly done. This is next on the design table.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Black Lotus 974 on 2024-01-19 18:38:10
    - When I double click on the panel to show me in fullscreen, the screen remains black and nothing appears but if I right click I see that's the panel because it shows me the context menu. Has it been reported by other people ?
    What settings are you using? Is a track playing? Do any of the axis appear? A completely black screen has never been reported.

    Hi, this is the panel into my fb2k and when I double click on the panel. As you can see it seems I can do right click but nothing is showed. There is 2 windows : the fb2k window which shows me that spectrum is displayed in the thumb, and the plugin window which shows me a black screen.
    I have a dual screen, is it supposed to be an issue for displaying in fullscreen ?
    I made screenshots of the configuration

    Hi, does anybody have the same issue than me ?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: metal_termite on 2024-01-19 19:39:42
    Minor cosmetic issue when visualization type is set to curve. When nothing is playing the top of the curve line appears on the very bottom of the analyzer (see image below). I think expected behavior would be that nothing is visible.

    (https://i.imgur.com/oVEChik.png)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-19 21:43:13
    Minor cosmetic issue when visualization type is set to curve. When nothing is playing the top of the curve line appears on the very bottom of the analyzer (see image below). I think expected behavior would be that nothing is visible.

    (https://i.imgur.com/oVEChik.png)
    It didn't bother me. I'll see if I can remove it efficiently.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-19 21:45:41
    - When I double click on the panel to show me in fullscreen, the screen remains black and nothing appears but if I right click I see that's the panel because it shows me the context menu. Has it been reported by other people ?
    What settings are you using? Is a track playing? Do any of the axis appear? A completely black screen has never been reported.

    Hi, this is the panel into my fb2k and when I double click on the panel. As you can see it seems I can do right click but nothing is showed. There is 2 windows : the fb2k window which shows me that spectrum is displayed in the thumb, and the plugin window which shows me a black screen.
    I have a dual screen, is it supposed to be an issue for displaying in fullscreen ?
    I made screenshots of the configuration
    Hi, does anybody have the same issue than me ?
    I haven't investigated it yet. Driver issue? I regularly run fb2k with 3 screens without any problems.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-01-20 10:55:58
    1. Shouldn't the configuration window be honoring the user selected dark/light mode?
    Yes, but I ran into problems with the standard way of implementing this because the dialog is not a foobar2000 settings page. I'll go back to it later.
    Does it mean that the config window has to be rewritten from scratch?

      2B. Peak mode for curve type
    Noted.
    I guess that audioMotion-analyzer already have peak lines mode, so I'd appreciate that if it is implemented

    BTW, implementing something like analog-style analyzer (https://codepen.io/TF3RDL/pen/MWLzPoO) 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
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-20 11:29:28
    1. Shouldn't the configuration window be honoring the user selected dark/light mode?
    Yes, but I ran into problems with the standard way of implementing this because the dialog is not a foobar2000 settings page. I'll go back to it later.
    Does it mean that the config window has to be rewritten from scratch?
    It is written from scratch.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-01-20 12:10:50
    You can still use fb2k::CCoreDarkModeHooks in popup dialogs. Although that is built in to core, the DarkMode implementation in Peter's libPPUI gives a clue as to what controls it can handle automatically...

    https://github.com/jscript-panel/foobar2000-sdk/blob/32f6b8029d59247d633b952c79f11ed2e8601cc8/libPPUI/DarkMode.cpp#L1795-L1825

    You might have to handle more exotic ones manually.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Black Lotus 974 on 2024-01-20 14:08:39
    I haven't investigated it yet. Driver issue? I regularly run fb2k with 3 screens without any problems.

    Hi, my driver is up to date. Is there a thing I can do to help you investigate it ?
    Regards.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-01-20 14:22:32
    You might have to handle more exotic ones manually.

    And that is the case. It took 3 lines of code for this but one control needs more work...

    My pr for foo_midi uses the same code used here.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-20 16:07:16
    You might have to handle more exotic ones manually.

    And that is the case. It took 3 lines of code for this but one control needs more work...

    My pr for foo_midi uses the same code used here.
    I'll have a second look. Like I said, I ran into problems during initial development and I didn't wanted to waste time on it then.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-20 17:21:29
    You might have to handle more exotic ones manually.

    And that is the case. It took 3 lines of code for this but one control needs more work...

    My pr for foo_midi uses the same code used here.
    I'll have a second look. Like I said, I ran into problems during initial development and I didn't wanted to waste time on it then.
    Done. I still think it's ugly and I will have to upgrade the menu listbox and the Channels button.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-01-21 10:12:12
    and the Channels button.

    Heh, I didn't even notice that. :P

    I recently applied dark mode support to the colour picker and have an issue with the right hand slider where I can't style it. :/



    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-21 10:46:50
    and the Channels button.
    Heh, I didn't even notice that. :P

    I recently applied dark mode support to the colour picker and have an issue with the right hand slider where I can't style it. :/
    The gradient is just a Static control but the slider itself is a triangle drawn by the dialog when responding to mouse movement events. I had to recreate it completely to get the same behavior for the alpha slider.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-21 16:05:57
    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 (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.0.0-beta-1).

    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2024-01-21 16:17:20
    Thank you.
    Quote
    Improved: The curve is no longer visible as a flat line if no track is playing.
    With bar mode a flat line is also visible. To reproduce: open Configuration window.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MG240 on 2024-01-21 16:27:10
    Thanks a lot for the new release.

    Crash report: When the component is activated in a window, toggling full-screen mode on and off crashes the program.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-21 18:33:48
    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 (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.0.0-beta-1).

    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) ...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-21 18:51:05
    A slope control would be nice. I usually have my frequency analysers (SPAN or Prism) set to 3, 4.5 or 6dB slope towards the highs to read "flatter".
    Do you have any documentation or articles I can read because I don't understand what you're asking?

    A standard analyser with no slope/weighting will make White Noise look "flat", but most musical program signals follow something closer to a Pink Noise spectrum (a 3dB per octave roll off) or even more. Music on standard analysers will always show more level in the bass than looks natural. More advanced analysers will have a dB slope control where you can adjust it to your liking. I'd highly recommend downloading Voxengo SPAN and TDR Prism (both free plugins), having a play, and reading their manuals to understand it a bit better. Prism is state of the art (I was on the beta team).

    https://www.voxengo.com/product/span/

    https://www.tokyodawn.net/tdr-prism/

    The Prism manual explains it really well:

    https://docs.tokyodawn.net/tdr-prism-manual/#Analyzer_Weighting
    Also, I've already implemented the weighting functions, frequency tilting, and even ones derived from Winamp's Classic Spectrum Analyzer plugin here (https://codepen.io/TF3RDL/pen/poQJwRW)
    Implemented in the next version.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-21 18:54:30
    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 (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.0.0-beta-1).

    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) ...
    It's not implemented yet even though there is a background mode None. 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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: metal_termite on 2024-01-21 18:59:02
    Thank you @pqyt for the continued development😃

    So if I wanted the peak to be a distinct color that was different from the bars or the curve, how would would I set up the graph? Is that possible?

    I guess I'm not sure what the % value input means nor the smoothing dropdown.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-21 19:09:17
    It's not implemented yet even though there is a background mode None. 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.

    Ok. I'll wait.

    One other thing ... As you can see I'll be sticking to curve mode. In curve mode there's always a vertical line on the left side in the same colour and width as the curve line itself. How can I get rid of that vertical line?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-21 19:11:13
    Thank you @pqyt for the continued development😃
    Thx.
    So if I wanted the peak to be a distinct color that was different from the bars or the curve, how would would I set up the graph? Is that possible?
    The peak currently uses the first color in the color scheme except for Fade Out which is white. It's not yet configurable.
    I guess I'm not sure what the % value input means nor the smoothing dropdown.
    The percentage determine the position of the color in a gradient. If you have 5 colors and you want the transition evenly spread then the colors are positioned at 0% (the beginning), 25%, 50%, 75% and 100% (the end of the spectrum),

    Smoothing applies smoothing to the spectrum values. "Average" averages out any peak values causes a smoother spectrum; "Peak" keeps all peak values and makes the spectrum appear more 'jumpy'.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-21 19:14:33
    It's not implemented yet even though there is a background mode None. 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.
    One other thing ... As you can see I'll be sticking to curve mode. In curve mode there's always a vertical line on the left side in the same colour and width as the curve line itself. How can I get rid of that vertical line?
    Not yet. The curve is drawn twice, once for the area and another time for the bounding line. The vertical lines are necessary for the area fill to work. I had no idea of the performance impact so I re-used 1 copy of the curve.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-21 19:14:49
    Another nice to have. Please add an extra Apply button in the Configuration that applies the changes you made in the configuration but keeps the Configuration panel open (until you click OK).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-21 19:27:29
    Another nice to have. Please add an extra Apply button in the Configuration that applies the changes you made in the configuration but keeps the Configuration panel open (until you click OK).
    Erhh, why? All changes are live. "Cancel" returns to the previous configuration set. Every 1h of feature development requires 1.5h of UI development because of that.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-21 19:50:58
    Thanks a lot for the new release.

    Crash report: When the component is activated in a window, toggling full-screen mode on and off crashes the program.
    Fixed in the next release. Direct2D really wants the correct multi-threading settings...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-21 19:54:27
    Another nice to have. Please add an extra Apply button in the Configuration that applies the changes you made in the configuration but keeps the Configuration panel open (until you click OK).
    Erhh, why? All changes are live. "Cancel" returns to the previous configuration set. Every 1h of feature development requires 1.5h of UI development because of that.

    Because it's nice to see what the changes you make in configuration panel do for the visualisation. If the thing you changed does not work for you, you can revert it without opening the configuration panel. Not that it is relevant but most plugins/addons I use have this functionality.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-21 20:55:36
    Another nice to have. Please add an extra Apply button in the Configuration that applies the changes you made in the configuration but keeps the Configuration panel open (until you click OK).
    Erhh, why? All changes are live. "Cancel" returns to the previous configuration set. Every 1h of feature development requires 1.5h of UI development because of that.

    Because it's nice to see what the changes you make in configuration panel do for the visualisation. If the thing you changed does not work for you, you can revert it without opening the configuration panel. Not that it is relevant but most plugins/addons I use have this functionality.
    What is not clear about 'live'? Every change you make is immediately applied to the component, even while playing a track. So no, there will be no Apply button.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-21 21:24:41
    What is not clear about 'live'? Every change you make is immediately applied to the component, even while playing a track. So no, there will be no Apply button.

    My bad. Checked again. You're right. All changes are done on the fly.
    Except for changes between background mode None and Solid. That threw me off.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-01-22 10:52:49
    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

    Title: Re: foo_vis_spectrum_analyzer
    Post by: anamorphic on 2024-01-22 16:12:28
    Crash report: When the component is activated in a window, toggling full-screen mode on and off crashes the program.
    Fixed in the next release. Direct2D really wants the correct multi-threading settings...
    Maybe a similar thing: when in Layout Editing Mode (DUI), trying to cut/copy the Spectrum Analyzer element and then paste it again into a splitter, also crashes foobar (v2.1.1 / 32-bit)

    In any case, this is already a lovely component. Seeing you're in mid-development, I do have a feature request - I wonder if it would be possible to either A) allow to set a custom background image, or B) allow to set the other artwork threaders as background image (Artist, Disc, Back) besides the Front cover?

    (The B option would essentially allow the A option, by using one of the artwork threads to set a path to a custom image, but of course it would be better to not have to sacrifice one of them as such)

    Thanks for your efforts! 8)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: grimes on 2024-01-22 16:19:00
    Maybe a similar thing: when in Layout Editing Mode (DUI), trying to cut/copy the Spectrum Analyzer element and then paste it again into a splitter, also crashes foobar (v2.1.1 / 32-bit)
    Crashes also in CUI.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: anamorphic on 2024-01-22 16:45:37
    ^ Yep, I'm actually using CUI too, but adding the visualization to a DUI foo_flowin (https://github.com/ttsping/foo_flowin) window, as background to a transparent foobar window. It looks awesome. :D
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-22 17:12:24
    Maybe a similar thing: when in Layout Editing Mode (DUI), trying to cut/copy the Spectrum Analyzer element and then paste it again into a splitter, also crashes foobar (v2.1.1 / 32-bit)
    Crashes also in CUI.
    Already fixed in the next release. All caused by the same bug.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-23 07:10:21
    A slope control would be nice. I usually have my frequency analysers (SPAN or Prism) set to 3, 4.5 or 6dB slope towards the highs to read "flatter".
    Do you have any documentation or articles I can read because I don't understand what you're asking?

    A standard analyser with no slope/weighting will make White Noise look "flat", but most musical program signals follow something closer to a Pink Noise spectrum (a 3dB per octave roll off) or even more. Music on standard analysers will always show more level in the bass than looks natural. More advanced analysers will have a dB slope control where you can adjust it to your liking. I'd highly recommend downloading Voxengo SPAN and TDR Prism (both free plugins), having a play, and reading their manuals to understand it a bit better. Prism is state of the art (I was on the beta team).

    https://www.voxengo.com/product/span/

    https://www.tokyodawn.net/tdr-prism/

    The Prism manual explains it really well:

    https://docs.tokyodawn.net/tdr-prism-manual/#Analyzer_Weighting
    Also, I've already implemented the weighting functions, frequency tilting, and even ones derived from Winamp's Classic Spectrum Analyzer plugin here (https://codepen.io/TF3RDL/pen/poQJwRW)
    Implemented in the next version.
    @darkflame23 ,

    I've implemented the A, B, C, D and M-weighting from the @TF3RDL code but I have difficulty finding information about the other Prism weighting functions (slope, X-Curve, N-Curve, etc). Do you have any?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: darkflame23 on 2024-01-23 10:12:45
    No, I've no idea what those weighting curves are, and never use them! For me a simple 3, 4.5 or 6dB is usually what I choose.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-01-23 10:52:00
    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 (https://github.com/WACUP/vis_classic/blob/f166eb52e1a5f33c7a487a19b0bf23c36fa5ce45/FFTNullsoft/fft.cpp#L119)

    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?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-01-26 12:45:28
    if the better CQT/VQT method (using sliding DFT of course as in my CodePen project that visualizes audio using AudioWorklet (https://codepen.io/TF3RDL/pen/MWLzPoO) 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)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-26 17:55:27
    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 (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.0.0-beta-2) for now.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MaFred on 2024-01-27 11:45:20
    A great thing that you have constructed!  Thank you!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-28 12:35:31
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-28 12:37:19
    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 (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.0.0-beta-1).

    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-28 13:06:00
    @Defender ,

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

    Sure! Where can I get beta 3?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-28 13:29:15
    @Defender ,

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

    Sure! Where can I get beta 3?
    It's not done yet. I'll post the release here.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: ApacheReal on 2024-01-28 17:41:44
    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

    (https://i.postimg.cc/3yhzL8Mq/Screenshot-2024-01-28-183757.png) (https://postimg.cc/3yhzL8Mq)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-28 18:26:44
    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

    (https://i.postimg.cc/3yhzL8Mq/Screenshot-2024-01-28-183757.png) (https://postimg.cc/3yhzL8Mq)
    The artwork and the color extraction is only done when once per track or when the parameters change. It must be something else.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-28 18:37:18
    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 (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.0.0-beta-3) for now.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-28 18:46:35
    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 (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.0.0-beta-3) 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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MG240 on 2024-01-28 22:53:26
    (v0.7.0.0-beta-3): Resizing visualization window crashes the program.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-29 05:35:47
    (v0.7.0.0-beta-3): Resizing visualization window crashes the program.
    Thx for the report. It's a whole new render technique.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-01-29 11:39:04
    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
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-29 12:33:44
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-29 15:05:20
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-01-29 16:21:39
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-29 18:01:48
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-29 18:23:52
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-29 20:12:16
    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).

    Title: Re: foo_vis_spectrum_analyzer
    Post by: metal_termite on 2024-01-29 20:15:12
    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
    (https://i.imgur.com/7R27Gua.png).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-29 21:16:34
    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 (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.0.0-beta-4) for now.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-29 22:06:11
    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).


    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-30 05:24:53
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MG240 on 2024-01-30 05:59:27
    (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?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-30 06:05:28
    (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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-01-30 09:22:01
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-30 09:42:17
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Xin-Hong on 2024-01-30 20:12:51
    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
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-01-31 00:18:20
    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:


    Title: Re: foo_vis_spectrum_analyzer
    Post by: Shinsekai on 2024-01-31 04:52:04
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-31 05:29:54
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-01-31 05:35:40
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Xin-Hong on 2024-01-31 20:11:56
    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
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-01-31 23:05:59
    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 (https://codepen.io/TF3RDL/pen/poQJwRW) (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?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: ElectroTheCat on 2024-02-02 00:55:34
    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?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-02-02 01:07:14
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: ElectroTheCat on 2024-02-02 02:29:25
    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  :))
    Title: Re: foo_vis_spectrum_analyzer
    Post by: anamorphic on 2024-02-03 19:17:07
    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
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-02-05 18:54:14
    BTW, implementing something like analog-style analyzer (https://codepen.io/TF3RDL/pen/MWLzPoO) 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 (https://www.nayuki.io/page/free-small-fft-in-multiple-languages) 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 (https://github.com/marton78/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?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Xin-Hong on 2024-02-05 20:07:51
    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 ?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-02-06 00:19:45
    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 (https://codepen.io/TF3RDL/pen/NWBYeaE) 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
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-02-06 01:55:39

    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-02-06 03:59:47
    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 (https://codepen.io/TF3RDL/pen/poQJwRW), 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
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-06 07:10:38
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: mycroft on 2024-02-07 17:26:13
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-07 18:06:05
    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 (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.0.0-rc-1) for now.

    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-02-07 19:42:56
    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
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-07 19:49:58
    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
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-07 20:40:39
    Still decided to test a bit. Returning from full screen 0.7.0.0-rc1 doesn't show the working plugin anymore. See video ...
    Unable to reproduce: multiple and rapid switching between windowed and fullscreen mode works perfectly. DUI or CUI?



    MOD edit: Removed excessive quoting
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-02-07 21:03:09
    Still decided to test a bit. Returning from full screen 0.7.0.0-rc1 doesn't show the working plugin anymore. See video ...
    Unable to reproduce: multiple and rapid switching between windowed and fullscreen mode works perfectly. DUI or CUI?

    CUI on fooBar 2.2 preview 2024-02-05 x86.

    Issue is that even if you exit fooBar and restart fooBar the plugin is not working.


    MOD edit: Removed excessive quoting
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-08 12:15:38
    Still decided to test a bit. Returning from full screen 0.7.0.0-rc1 doesn't show the working plugin anymore. See video ...
    Unable to reproduce: multiple and rapid switching between windowed and fullscreen mode works perfectly. DUI or CUI?

    CUI on fooBar 2.2 preview 2024-02-05 x86.

    Issue is that even if you exit fooBar and restart fooBar the plugin is not working.
    Please try re-applying a style of a visual element like f.e. the spectrum. State and event management in CUI is apparently different from DUI.



    MOD edit: Removed excessive quoting
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MaFred on 2024-02-08 16:48:57
    RC-1 does not work for me (foobar 2.2 preview with CUI). Frequent crashes of foobar when closing the settings dialog of RC-1, after closing foobar and restarting it I have a completely different look than I had set, or only the background is visible in the window... Reset to beta 4.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-08 17:38:45
    RC-1 does not work for me (foobar 2.2 preview with CUI). Frequent crashes of foobar when closing the settings dialog of RC-1, after closing foobar and restarting it I have a completely different look than I had set, or only the background is visible in the window... Reset to beta 4.
    CUI user? I found a problem in reading the CUI settings. That's what you get when we developers have to implement boring stuff twice.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-02-08 22:07:59
    That's what you get when we developers have to implement boring stuff twice.

    If you're talking about your read/write config overloads for DUI/CUI, you only have to implement one. There is no need for any duplication at all.

    I'm not submitting a PR but look at these attached files for how a common config class with one get/set method can be used by CUI and DUI.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-09 05:38:27
    That's what you get when we developers have to implement boring stuff twice.

    If you're talking about your read/write config overloads for DUI/CUI, you only have to implement one. There is no need for any duplication at all.

    I'm not submitting a PR but look at these attached files for how a common config class with one get/set method can be used by CUI and DUI.
    Thx. I will have a look. Yes, I was talking about the config reading and writing.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-02-09 07:09:18
    Also note how there is no sizeof in my config. read_object_t / write_object_t are your friends. :P
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-10 16:38:32
    v0.7.0.0-rc-2, 2024-02-10

    * Fixed (RC 1 regression): A couple of small bugs that could cause horrible crashes.

    You can download it only from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.0.0-rc-2) for now.

    This one has proven stable in every day use and has seen a lot of abuse. I hope some of you can confirm this.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-02-11 04:20:06
    Small feature request: Show dB labels on the right side of the screen and even on both left and right sides of the screen, and also show frequency/Hz labels on the top of the screen like you could in original foo_musical_spectrum

    Also, replace the Y-axis label setting drop-down menu with two checkbox buttons (one for setting the amplitude scale to dB instead of linear/nth root, another for Y-axis labels) as the option named "Logarithmic" is kinda misleading (it is actually linear/nth root amplitude scale) and there is currently no way to have a linear/nth root amplitude spectrum with dB labels on it to reflect what dB value of the magnitude would be at the point
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MaFred on 2024-02-11 17:02:29
    CUI user? I found a problem in reading the CUI settings. That's what you get when we developers have to implement boring stuff twice.
    A big thank you, RC-2 is working again! I am delighted with your great tool!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-11 18:51:51
    Small feature request: Show dB labels on the right side of the screen and even on both left and right sides of the screen, and also show frequency/Hz labels on the top of the screen like you could in original foo_musical_spectrum

    Also, replace the Y-axis label setting drop-down menu with two checkbox buttons (one for setting the amplitude scale to dB instead of linear/nth root, another for Y-axis labels) as the option named "Logarithmic" is kinda misleading (it is actually linear/nth root amplitude scale) and there is currently no way to have a linear/nth root amplitude spectrum with dB labels on it to reflect what dB value of the magnitude would be at the point
    @TF3RDL , I'll put it in the next release. The GUI update is the most work. In the mean time please have a look at my replies on GitHub.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-02-12 16:45:59
    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.
    While the CQT/VQT do already exist in this spectrum analyzer component, the performance of CQT/VQT is slow (especially with no downsampling for lower frequencies) since it currently uses Goertzel as I said before

    But is it actually possible to do synchrosqueezing in realtime? Isn't synchrosqueezing just the time-frequency reassignment?

    BTW, while this demo (https://codepen.io/TF3RDL/pen/MWLzPoO) currently only supports logarithmic frequency scale, my implementation of VQ-sDFT, SWIFT, and analog-style analyzer actually fully supports arbitrary frequency scale (linear, Mel, Bark, ERB, and even exotic ones) as usual, which makes a lot of sense for niche users

    Also, I've seen @pqyt replies to this issue (https://github.com/stuerp/foo_vis_spectrum_analyzer/issues/1) on GitHub about adding an analog-style analyzer alongside two variants of sliding DFT (https://wiki.hydrogenaud.io/index.php?title=Sliding_DFT) algorithm, which shows that the data acquisition part must be only new samples since last calculation for these cases, otherwise the artifacts shown in this image below:
    X
    whereas clean one would look like:
    X
    both of them are sourced from 440Hz and 880Hz tones playing simultaneously
    Title: Re: foo_vis_spectrum_analyzer
    Post by: mycroft on 2024-02-12 17:51:50
    With CWT I do not get such artifacts/leakages - using two sine wave generators.
    SSQ transforms just uses CWT output + additional calculations and makes frequency bin pick exact - say if tone is pure 440 Hz (no noise and no harmonics) it will show single pixel width line on spectrogram instead of several bins like in above pictures.

    CWT and SSQ are possible online/real time (for extreme big sample rates - needs more samples in cache and more calculations - thus slower on old CPUs) just not possible to get instant output - there is obvious latency/delay involved, but that is only relevant for live demos.

    Look here for SSQ vs CWT explanation https://dsp.stackexchange.com/questions/71398/synchrosqueezing-wavelet-transform-explanation.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-12 18:21:46
    v0.7.0.0, 2024-02-12

    * 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.
    * New: Acoustic weighting filters (A-, B-, C-, D- and M-weighting (ITU-R 468))
    * New: Brown-Puckette constant Q transform.
    * New: Full Screen mode for Columns UI.
    * New: File path of the artwork can be specified as a file path or a title formatting script that returns a file path.
    * 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.
    * New: Tooltips that provides some explanation about the various configuration settings.
    * Changed: X-axis mode 'Octaves' shows only 'C' notes; Mode 'Notes' shows all notes.
    * Improved: Curve mode can use a horizontal gradient.
    * Improved: The curve is no longer visible as a flat line when no track is playing.
    * 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.
    * Improved: Bar width and peak indicator thickness get rounded to pixels for a more visually pleasing result.
    * Improved: Minor performance optimizations due to styles.
    * Improved: Optimized the calculation of the Curve visual.

    You can download it from the Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or upgrade from within foobar2000.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-02-12 18:56:59
    Thanks pqyt, but could you please revise the Documentation page to cover/explain the myriad of new options in this version??  It's pretty intimidating.  Thanks!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-12 19:57:14
    Thanks pqyt, but could you please revise the Documentation page to cover/explain the myriad of new options in this version??  It's pretty intimidating.  Thanks!
    The tooltips should provide some first insights.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Shinsekai on 2024-02-12 20:05:51
    Using a low custom value (0 or 1) in "No. of bins" crashes foobar.
    v0.7.0.0.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-12 20:39:55
    Using a low custom value (0 or 1) in "No. of bins" crashes foobar.
    v0.7.0.0.
    Noted. But that does not make sense at all...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Shinsekai on 2024-02-12 20:47:51
    Yeah, it's just to test the component. I use 8192.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-12 20:58:12
    Yeah, it's just to test the component. I use 8192.
    Thanks anyway. I want it to be as stable as possible.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-02-13 06:04:56
    BTW, while this demo (https://codepen.io/TF3RDL/pen/MWLzPoO) currently only supports logarithmic frequency scale, my implementation of VQ-sDFT, SWIFT, and analog-style analyzer actually fully supports arbitrary frequency scale (linear, Mel, Bark, ERB, and even exotic ones) as usual, which makes a lot of sense for niche users
    Well, I've actually updated this demo (https://codepen.io/TF3RDL/pen/MWLzPoO) to support arbitrary frequency scale (though analog-style analyzer works best on logarithmic frequency scale), and turns out, the 0Hz frequency band is total nonsense (for any frequency scales other than logarithmic) for analog-style analyzer, just like having the minimum frequency range is 0Hz for logarithmic frequency scale (which is nonsense anyway)

    BTW, here's the example of a SWIFT algorithm operating on any frequency scale other than logarithmic:
    X
    which is ERB-frequency, 4th order cascaded SWIFT, which is very similar to Gammatone auditory filter bank
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-02-13 06:57:31
    I hate to be a nag but 0.7.0.0 creates its window with white background again. I'd assume it to be highly annoying for anyone trying to use a dark UI as a sudden white flash is blindingly bright.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-13 07:16:39
    I hate to be a nag but 0.7.0.0 creates its window with white background again. I'd assume it to be highly annoying for anyone trying to use a dark UI as a sudden white flash is blindingly bright.
    Oops. Ripping out the DirectComposition code may have caused this regression.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MaFred on 2024-02-13 16:16:54
    I have noticed that when I change the value under "Frequencies - No. of Bands", the displayed frequencies on the X-axis shift up or down!
    In my case, two test tones with 1000 and 2000 Hz are only displayed correctly on the X-axis with a value of "295". With other values, the test tones shift up or down significantly in some cases. (Version 0.7.0.0 RC-2/foobar mit CUI).

    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-13 17:42:55
    I have noticed that when I change the value under "Frequencies - No. of Bands", the displayed frequencies on the X-axis shift up or down!
    In my case, two test tones with 1000 and 2000 Hz are only displayed correctly on the X-axis with a value of "295". With other values, the test tones shift up or down significantly in some cases. (Version 0.7.0.0 RC-2/foobar mit CUI).
    Hmm, please provide some more details. The way you explain your problem it sounds that this is by design. Which distribution are you using? Which frequency range? Can you attach some screenshots?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Sue Dunham on 2024-02-13 19:07:58
    I noticed an odd bug with the new version when there are two color selection dialogs open. For instance, I have two spectrum analyzers in my layout, one for each channel, and I was trying to match the custom gradient from one to the other. If one cycles between them in the wrong order, then one of them will not function properly.

    In my case, I needed to add colors to the two given by default. So I clicked "Add", which brings up a dialog. Then I double-clicked a color on the other analyzer's configuration page to open that dialog so I could copy the colors. However, on returning to the first dialog, I found that the tab button no longer worked to move from textbox to textbox, and the resulting color was not saved.

    If, on the other hand, I opened that second, base, dialog first to get my source color and then clicked "Add" in the configuration I was editing, I could use everything as normal.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-13 19:48:38
    I noticed an odd bug with the new version when there are two color selection dialogs open. For instance, I have two spectrum analyzers in my layout, one for each channel, and I was trying to match the custom gradient from one to the other. If one cycles between them in the wrong order, then one of them will not function properly.

    In my case, I needed to add colors to the two given by default. So I clicked "Add", which brings up a dialog. Then I double-clicked a color on the other analyzer's configuration page to open that dialog so I could copy the colors. However, on returning to the first dialog, I found that the tab button no longer worked to move from textbox to textbox, and the resulting color was not saved.

    If, on the other hand, I opened that second, base, dialog first to get my source color and then clicked "Add" in the configuration I was editing, I could use everything as normal.
    Hmm, pretty specific scenario. Thx. for the report. I'll try to reproduce it. But I'm planning to add a dual-spectrum layout in the next version if it's not too complex to implement.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-02-13 19:59:32
    If configuring colours is the tricky bit, do that in one instance until you're happy with and then copy/paste it. DUI lets you do that in layout editing mode or use the Layout section of the CUI preferences (I've never got on with CUI live editing :P)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-14 11:51:43
    Also, replace the Y-axis label setting drop-down menu with two checkbox buttons (one for setting the amplitude scale to dB instead of linear/nth root, another for Y-axis labels) as the option named "Logarithmic" is kinda misleading (it is actually linear/nth root amplitude scale) and there is currently no way to have a linear/nth root amplitude spectrum with dB labels on it to reflect what dB value of the magnitude would be at the point
    I don't understand. Checkboxes would mean that both options can be enabled. What is this going to achieve?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-14 14:21:21
    Also, replace the Y-axis label setting drop-down menu with two checkbox buttons (one for setting the amplitude scale to dB instead of linear/nth root, another for Y-axis labels) as the option named "Logarithmic" is kinda misleading (it is actually linear/nth root amplitude scale) and there is currently no way to have a linear/nth root amplitude spectrum with dB labels on it to reflect what dB value of the magnitude would be at the point
    I don't understand. Checkboxes would mean that both options can be enabled. What is this going to achieve?
    Never mind. I changed the label from Logarithmic to Linear/n-th root. The checkbox and the root index can already be specified.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-14 17:42:46
    v0.7.1.0-beta-1, 2024-02-14

    * New: Sliding Windowed Infinite Fourier Transform (SWIFT).
    * New: Reaction Alignment parameter allow you to control the delay between the actual playback and the visualization.
    * New: The X-axis can be displayed on top, below or on both sides of the spectrum.
    * New: The Y-axis can be displayed on left, right or on both sides of the spectrum.
    * New: Option to enable or disable the rendering of the mirror image of the spectrum (Anything above the Nyquist frequency). Default is disabled.
    * Changed: Y-axis mode Logarithmic is now called Linear/n-th root.
    * Fixed: Added some missing range checks in the configuration dialog that could lead to a crash.
    * Fixed (Regression): Incorrect background color during startup caused a bright flash in dark mode.

    You can download it only from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.1.0-beta1) for now.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: metal_termite on 2024-02-14 20:45:36
    Thanks for all the work and quick progress @pqty

    Maybe this is not a bug and I am just an idiot, but creating a layout with 3 ui elements of this visualizer kills the fps by quite a bit. The fps remains unaffected when I have two of these UI elements, but adding the third is when the performance drops off. I have mine set at 60fps, and adding a third instance causes the fps of all the ui elements to drop into the 10-20fps range.

    Why does my layout have three? I have a visualizer tab, and three of those tabs are different schemas of foo_vis_spectrum_analyzer (curve layout, bar layout, etc). Only one of the instance can ever be visually active since they're in tabs, but I guess they're all active in the background? I just assumed if a tab wasn't active that the process was halted in the background.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-14 22:07:52
    Thanks for all the work and quick progress @pqty

    Maybe this is not a bug and I am just an idiot, but creating a layout with 3 ui elements of this visualizer kills the fps by quite a bit. The fps remains unaffected when I have two of these UI elements, but adding the third is when the performance drops off. I have mine set at 60fps, and adding a third instance causes the fps of all the ui elements to drop into the 10-20fps range.

    Why does my layout have three? I have a visualizer tab, and three of those tabs are different schemas of foo_vis_spectrum_analyzer (curve layout, bar layout, etc). Only one of the instance can ever be visually active since they're in tabs, but I guess they're all active in the background? I just assumed if a tab wasn't active that the process was halted in the background.
    There's logic in there that skips the rendering when it is hidden but the spectrum calculations continue with every frame. I'll look at a way to optimize it.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-02-15 04:05:39
    v0.7.1.0-beta-1, 2024-02-14

    * New: Sliding Windowed Infinite Fourier Transform (SWIFT).
    * New: Reaction Alignment parameter allow you to control the delay between the actual playback and the visualization.
    However, a correct one for both reaction alignment (as I've found by using Desmos graph like this (https://www.desmos.com/calculator/0xuclhlowd) and this (https://www.desmos.com/calculator/ozaublqxqt)) and any transforms that would require you to feed only new samples would be something like this:
    Code: [Select]
    const bool IsSlidingWindow = _State._Transform == Transform::AnalogStyleAnalyzer || _State._Transform == Transform::SWIFT || _State._Transform == Transform::VQsDFT;
    const double WindowSize = isSlidingWindow ? PlaybackTime - PrevPlaybackTime :  (double) _NumBins / (double) _SampleRate;
    const double Offset = IsSlidingWindow ? PrevPlaybackTime : PlaybackTime - (WindowSize * (0.5 + _State._ReactionAlignment/2.0));

    if (_VisualisationStream->get_chunk_absolute(Chunk, Offset, WindowSize))
      ProcessAudioChunk(Chunk);
    PrevPlaybackTime = PlaybackTime;
    where acceptable range for reaction alignment parameter is negative one (all samples besides the first ahead actual playback) and positive one (all samples asides the last one behind actual playback) and PrevPlaybackTime is the playback time since last calculation so with difference between current and last playback time that the audio chunk we got should only contain new samples that isn't covered in previous calculation, see this part (https://github.com/stengerh/foo_r128meter/blob/1d1f82de400613fb41d59c34602469ba238aba8f/foo_r128meter/foo_r128meter.cpp#L241) on foo_r128meter component

    However, what's makes the reaction alignment parameter noticeable is where multiple instances of it have different settings, or put with other spectrum visualization components like fb2k's built-in Spectrum visualization and especially foo_enhanced_spectrum_analyzer (where all samples besides the first sample fed into Enhanced Spectrum analyzer component are ahead of actual playback time, aka. the reaction alignment of minus one)

    Also, increase the max FFT size to 65536 samples (which is more than getFloatTimeDomainData method on Web Audio API's AnalyserNode can do) and max FFT length to 2 seconds (aka. 2000ms long), but anything higher than 32768 or 1000ms works best with output buffer length larger than 1000ms

    * New: The X-axis can be displayed on top, below or on both sides of the spectrum.
    * New: The Y-axis can be displayed on left, right or on both sides of the spectrum.
    * New: Option to enable or disable the rendering of the mirror image of the spectrum (Anything above the Nyquist frequency). Default is disabled.
    * Changed: Y-axis mode Logarithmic is now called Linear/n-th root.
    Ah, that makes sense now, but isn't complete without having a feature to display dB labels on linear amplitude spectrum like this:
    X
    in which dB labels are spaced closer on bottom part of the spectrum since decibels are logarithmic, not linear as well as the DC (only shown when the frequency scale is set to anything other than logarithmic and period, which makes no sense if the min frequency range is 0Hz) and Nyquist labels (not shown on this image above)

    * Fixed: Added some missing range checks in the configuration dialog that could lead to a crash.
    Ah, I get that range checks exists to reduce stability complaints on extreme settings, but on my own spectrum analyzer on CodePen like this (https://codepen.io/TF3RDL/pen/poQJwRW) and this (https://codepen.io/TF3RDL/pen/VwENJbB), I can set the min and max frequency range to exactly 0Hz, apart from logarithmic and period (1/x) frequency scales, which makes absolutely no sense even if it doesn't introduces stability issues

    Also, on Avee Player's frequency scale, setting the min frequency range to 0Hz also doesn't make any sense at all
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-15 13:13:25
    Thanks for all the work and quick progress @pqty

    Maybe this is not a bug and I am just an idiot, but creating a layout with 3 ui elements of this visualizer kills the fps by quite a bit. The fps remains unaffected when I have two of these UI elements, but adding the third is when the performance drops off. I have mine set at 60fps, and adding a third instance causes the fps of all the ui elements to drop into the 10-20fps range.

    Why does my layout have three? I have a visualizer tab, and three of those tabs are different schemas of foo_vis_spectrum_analyzer (curve layout, bar layout, etc). Only one of the instance can ever be visually active since they're in tabs, but I guess they're all active in the background? I just assumed if a tab wasn't active that the process was halted in the background.
    There's logic in there that skips the rendering when it is hidden but the spectrum calculations continue with every frame. I'll look at a way to optimize it.
    This turns out to be more difficult than I expected: all the old techniques of discovering if a window is covered are broken due to desktop composition in the recent Windows versions.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-02-15 13:38:53
    IsWindowVisible works for tabs. No use for other windows that cover it though.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-15 14:01:05
    @TF3RDL ,

    However, a correct one for both reaction alignment (as I've found by using Desmos graph like this (https://www.desmos.com/calculator/0xuclhlowd) and this (https://www.desmos.com/calculator/ozaublqxqt)) and any transforms that would require you to feed only new samples would be something like this:
    I implemented your suggestion, even tough Transform::AnalogStyleAnalyzer and Transform::VQsDFT will have to wait, except for the division by 2: there's no need for it if the input parameter is adjusted accordingly. Every calculation counts during rendering. For the FFT it produces unusable results.

    Also, foo_r128meter uses the undocumented request_backlog() call which I'm sure has something to do with the shift of the window but I don't know what.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-15 14:05:48
    IsWindowVisible works for tabs. No use for other windows that cover it though.
    True, because a Tab control hides its child windows. I'll use that for now; it won't hurt. But a child window covered by a top level window of another application is not detected.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-02-17 00:27:30
    except for the division by 2: there's no need for it if the input parameter is adjusted accordingly.
    Yeah, division by 2 is unnecessary if the sensible range for "Reaction Alignment" is -0.5...0.5 instead of -1...1 range as in Vizzy.io right?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-17 10:17:13
    Sneak preview:

    (https://github.com/stuerp/foo_vis_spectrum_analyzer/blob/vNext/Resources/Preview.png?raw=true)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Kraeved on 2024-02-17 12:50:30
    @Brazil2, I confirm that this component does not work on Windows 7 x64. It is sad to see that its author does not seek to make the solution more accessible, but obeys the compiler defaults, in fact putting the sovereignty of development in the hands of corporations that use artificial obsolescence (https://en.wikipedia.org/wiki/Planned_obsolescence) for their own benefit. One should try to make plugins so that they match the Foobar2000's audience, for this player works fine on Windows 7.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-02-17 13:07:45
    Comparing a hobbyist giving away dozens/hundreds of hours of their own free time and expecting nothing in return isn't really comparable to the planned obsoloesnce employed by mega corps to get you to buy more.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-17 13:40:30
    Comparing a hobbyist giving away dozens/hundreds of hours of their own free time and expecting nothing in return isn't really comparable to the planned obsoloesnce employed by mega corps to get you to buy more.
    Don't feed the trolls.. ;-)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Kraeved on 2024-02-17 17:28:14
    @marc2k3, the presence of sadder things, such as ocean pollution or deforestation, does not mean that we should turn a blind eye to the sad phenomena of a smaller scale, such as polluting computers with poorly designed or sloppy coded apps, because one gradually grows out of the other. Having a hobby related to bringing something into the world for free is commendable. But, firstly, the reward comes indirectly, at least in the form of a catchy line in the CV, the attention of the opposite sex and a sense of superiority that warms the ego. And, secondly, it does not exclude criticism according to the law of cause and effect since one performs in the public space, just as a free playing musician is unlikely to escape criticism not only for pooping in the street, but also for using a poorly tuned instrument. Fortunately, in the case of the Foobar2000 community, we have much more reason to praise than to criticize.

    @pqyt, I have come here 5 years before you, got no penalties, and post only when the topic worries me, not to waste time, traffic, or database records. Is that typical behavior of a troll? No. But labeling someone negatively as a troll just because their feedback is not about praise is very typical of an immature person. It is bad enough that the limited accessibility of your solution pet project casts a shadow on other freely made components and the player itself, there is no need to get personal. But if that is what you want, then I'd rather do it offline.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-17 20:28:53
    @pqyt, I have come here 5 years before you, got no penalties, and post only when the topic worries me, not to waste time, traffic, or database records. Is that typical behavior of a troll? No. But labeling someone negatively as a troll just because their feedback is not about praise is very typical of an immature person. It is bad enough that the limited accessibility of your solution pet project casts a shadow on other freely made components and the player itself, there is no need to get personal. But if that is what you want, then I'd rather do it offline.
    @Kraeved ,

    posting a hostile comment on a public forum just to talk down someone's free work is the very definition of a troll.

    The requirements of the component are clearly documented in the ReadMe. Some are by choice, some out of necessity.

    Your 5 extra years on this forum sure haven't taught you manners. Instead you could have:

    - Asked me to make the component compatible with Windows 7.
    - Offered to test it because I don't have the time nor access to an antique operating system.
    - Compiled your own version and issued a pull request on GitHub.

    I sure hope you don't speak for the whole community.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Kraeved on 2024-02-17 21:19:37
    @pqyt, my original comment (https://hydrogenaud.io/index.php/topic,125031.msg1039490.html#msg1039490) contains facts and sadness, not hostility.

    I am making it clear to another user that he is not alone in his inability to use this component. After that, I explain the reason for the sadness, which is the digital segregation: other local developers are doing their best to make solutions more accessible, are you? There is even a Global Accessibility Awareness Day (https://accessibility.day/), however it applies more to people with disabilities, yet only an immature person would say “they're antique minority” or something. The truth tastes bitter, it is hard to swallow, it stings, hostility has nothing to do with that. So how is hostility actually expressed? For example, when someone calls you a monkey, such expressions are marked in dictionaries (https://www.oed.com/dictionary/monkey_n?tl=true#36271185) as offensive, meant to harm the recipient. You know, I often look into dictionaries, since English is not my native language.

    Let's try again. I'm ready to test the component on Windows 7 x64 if you see the way to make it compatible.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-02-17 22:18:55
    You amateurs don't know the meaning of the word hostile. See here for a better example....  ;D

    https://hydrogenaud.io/index.php/topic,116669.msg1026340.html#msg1026340

    While you might argue nothing justifies that kind of language, it does boil down to the exact same thing going on right here, right now. And that's people being told what they should be spending their own free time on as if wasn't their own. I can't speak for everyone but it's something that really rubs me up the wrong way.

    Let's flip the roles. How about you go and do 20-30 hours worth of work and give me all the money. Your time belongs to me, right?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-02-17 22:50:19
    Sneak preview:

    (https://github.com/stuerp/foo_vis_spectrum_analyzer/blob/vNext/Resources/Preview.png?raw=true)
    yes, so next up is Mid/Side mode (can be easily implemented by having two "channel to visualize" parameters instead of just one currently, whereas the first summed PCM defined by first one are subtracted by second one defined by the second one before any spectrum transformations, so this way it can also visualize the FFT of difference between front and rear channels and even center and LFE, not just difference of Left/Right channels) and overlayed channel spectrum like this (https://codepen.io/TF3RDL/pen/VwENJbB):
    X
    where the different color is assigned to one channel while the another channel gets the different one and so on (in this case, blue color is assigned to left channel and red is assigned to right channel graphs respectively) to differentiate each other when superimposing individual channel spectrum into a single graph
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Brazil2 on 2024-02-18 13:27:21
    @Brazil2, I confirm that this component does not work on Windows 7 x64.
    It works for me on Windows 7 SP1 x64 with foobar2000 v2.1.2 x64 in portable mode.
    Version 0.6.0.3 of the component works fine and even the latest 0.7.1.0 beta1 build:

    (https://i.postimg.cc/FsdMFzvM/Spectrum-Analyzer.png)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Kraeved on 2024-02-18 14:15:31
    @Brazil2, it is possible to install the component 0.7.1 on my Foobar2000 2.1 as well. But after calling it from the View/Visualizations menu, the player crashes. The earlier betas of 0.7.* do not load at all, the error is: “Failed to load DLL: foo_vis_spectrum_analyzer.dll. Reason: Unknown error code (3765269347)”. However, I confirm that 0.6.0.3 works fine.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-02-18 14:19:35
    Small suggestion for the preview picture:

    1) Option to mirror the left channel (so frequency runs from high to low instead of the default low to high)
    2) Option to disable the right side y-as display for left channel and the left side y-as display for right channel

    Result something like the attached picture ...

    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-18 14:31:20
    Small suggestion for the preview picture:

    1) Option to mirror the left channel (so frequency runs from high to low instead of the default low to high)
    2) Option to disable the right side y-as display for left channel and the left side y-as display for right channel

    Result something like the attached picture ...
    Already working on it. It was just a preview.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-18 20:58:08
    Another sneak preview:

    (https://github.com/stuerp/foo_vis_spectrum_analyzer/blob/vNext/Resources/Preview.png?raw=true)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Brazil2 on 2024-02-18 22:45:30
    component 0.7.1 on my Foobar2000 2.1 as well. But after calling it from the View/Visualizations menu, the player crashes.
    I'm now getting crashes as well with version 0.7.1.0 beta. It began with crashes on exit of foobar2000 and now it crashes at start, I can't run foobar2000 anymore. :( I've put back my profile backup and I'll stick with version 0.6.0.3 for now.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: jaybeee on 2024-02-19 10:07:40
    Many thanks for this plugin  :D

    Bug:
    - the tooltip that displays the frequency is right-aligned, but is out of view when displayed for the higher frequencies.

    Left-aligning it would work better and may be ok the lowest frequencies too.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-19 11:00:38
    component 0.7.1 on my Foobar2000 2.1 as well. But after calling it from the View/Visualizations menu, the player crashes.
    I'm now getting crashes as well with version 0.7.1.0 beta. It began with crashes on exit of foobar2000 and now it crashes at start, I can't run foobar2000 anymore. :( I've put back my profile backup and I'll stick with version 0.6.0.3 for now.
    Does fb2k crash or does it hang? A hang is caused by a deadlock which will be solved in the next beta.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Kraeved on 2024-02-19 11:53:42
    @pqyt, c r a s h.

    (https://i2.imageban.ru/out/2024/02/19/46b5f31b189f65c87aec5bf3e136d6d7.png)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Brazil2 on 2024-02-19 19:34:46
    Does fb2k crash or does it hang?
    Always a crash, I got the "Send report" message box each time.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-02-20 03:09:14
    Another sneak preview:

    (https://github.com/stuerp/foo_vis_spectrum_analyzer/blob/vNext/Resources/Preview.png?raw=true)
    The channel spectrum visualization is not complete without an optional feature to use pseudo-logarithmic scaling similar to original Channel Spectrum panel (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Channel_Spectrum_panel_(foo_uie_vis_channel_spectrum)) (this admittedly have stability issues according to online troubleshooter (https://help.foobar2000.org/troubleshooter/components/27ce5baaa2e552e5) at least), which is implemented in a CodePen project (https://codepen.io/TF3RDL/pen/NWBYeaE) about channel spectrum visualization

    BTW, The bottom spectrum flipped vertically look kinda cool actually, but how about combined spectrum/spectrogram and "Discrete frequencies" frequency distribution mode (where frequency bands are linearly spaced, equal to FFT bin's center frequencies, but the graph are scaled according to arbitrary frequency scale anyway, so uneven bar width are expected), which locks the transform mode to FFT and mapping to standard as it visualizes every raw FFT bins visible within specified frequency range? Something like this:
    X

    BTW, as this component is tested on Windows 10 and 11, expect stability and compatibility issues when running on Windows 7 or even 8.1 and in-addition, optimizing the Goertzel-based CQT/VQT, sDFT algorithms, and even analog-style analyzer with something like AVX instructions might cause stability problems with CPUs that don't have AVX instruction sets (which I heard this already happen sometimes in AAA games) unless fallbacks to older SIMD instructions down to SSE2 (which fb2k starting from version 1.6 requires a CPU with SSE2 instructions on it) are provided
    Title: Re: foo_vis_spectrum_analyzer
    Post by: always.beta on 2024-02-22 08:08:02
    add a spectrogram image function?  Like spek, to see the spectrogram of the selected track .
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-22 20:30:53
    v0.7.1.0-beta-2, 2024-02-22

    * New: Multiple graphs.
      * Each graph can be configured to show the analysis of one or more channels.
      * A graph can be flipped horizontally or vertically.
      * Graphs can be stacked vertically or on a horizontal line.
    * New: Context menu item to freeze and unfreeze the component.
    * Improved: Rendering and spectrum computation are not performed when the component window is hidden (to reduce the load on the computer).

    You can download it only from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.1.0-beta-2) for now.

    Again, this version has seen a lot of abuse, probing and poking but is definitely not bug-free. Since your config will be converted upon first use, make sure you have a backup of your config.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-02-22 22:15:30
    Could you update the graph description rendering not to render the rectangle if the string is empty. I tried leaving it blank as it's useless to me but end up with this...

    (https://i.imgur.com/uDC8HWH.png)

    Looks like relevant code is here...

    https://github.com/stuerp/foo_vis_spectrum_analyzer/blob/f16465ee33a9031dbc27e56046182ca8d408b99c/Visuals/Graph.cpp#L160-L180

    Oh and thanks for the updates.  8)

    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-02-23 01:56:46
    Another niggle, your gradient stop positions don't adjust on resize. Compare this before/after resize against my component which also implements them.

    edit: opening/closing the configure dialog or restarting fb2k sorts it out so I guess you create your brush on init and don't change.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-23 05:29:14
    edit: opening/closing the configure dialog or restarting fb2k sorts it out so I guess you create your brush on init and don't change.
    Thx for the report. Yes, the brush is cached, as it's supposed to be, but recognizing the need for a cache flush is a little more complicated due to the different threads.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-02-23 05:36:27
    * New: Multiple graphs.
      * Each graph can be configured to show the analysis of one or more channels.
      * A graph can be flipped horizontally or vertically.
      * Graphs can be stacked vertically or on a horizontal line.
    Finally, we don't have to use multiple instances of foo_musical_spectrum, and also one step closer to replicating foo_uie_vis_channel_spectrum for foobar2000 x64 (one thing currently missing is pseudo-logarithmic frequency scaling that becomes linear on larger number of bands)

    BTW, a Mid/Side mode and a capability to treat stereo audio as complex-valued input (can be easily implemented by having four of channel configuration settings for each graph; the first two are real part for FFT input data, and the latter two are imaginary part, first of the each pair is subtracted by the latter of each pair before FFT) would be appreciated
    Again, this version has seen a lot of abuse, probing and poking but is definitely not bug-free. Since your config will be converted upon first use, make sure you have a backup of your config.
    Expect some bugs and stability issues on beta (or any other pre-release) versions of this component, as well as unfinished features on these prerelease versions

    Also, here's the comparison of these two methods of calculating IIR CQT spectrum, first one is SWIFT (which is there in beta version of this component):
    X
    And the second one is analog-style analyzer (currently not implemented just yet on this component, so I have to use Voxengo AnSpec, which can be used within foobar2000 via foo_dsp_vst3's Visualize with VST feature):
    X

    Alas, the latter case is more epilepsy-inducing (especially when smoothing or peak decay is set to zero or none), just like trying to visualize the MDCT spectrum (or only the real part of FFT and discarding the imaginary part before taking the absolute value) since analog-style analyzer produces real-valued output, instead of usual complex-valued one (I guess we need some DSP knowledge on how to make a complex-valued IIR filter bank that have symmetric response when viewed on a logarithmic frequency scale)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-02-23 07:30:26
    edit: I just realised I read a post I linked to about re-using brushes completely back to front. Ignore me.

    Title: Re: foo_vis_spectrum_analyzer
    Post by: metal_termite on 2024-02-25 17:38:27
    1. Color source. What's the intended behavior of setting a Color Source to None? For example, Configure > Styles > Graph Description > Color source: None. I cannot discern a difference between Color Source None and Color Source Solid. I assumed it would hide the element, but it doesn't.

    2. GPU usage. I've noticed the most recent beta registers more GPU usage (per Task Manager), about 7%. Even when playback is paused the usage fluctuates that high. No changes were made to the config from the prior version. My setup has two spectrum windows running simultaneously. Freezing one does cut the usage in half. Anyway, just thought this might be relevant to report since the usage seems to have doubled or more from the prior version.

    Edit: Another thing I've noticed. When using only the stock vis components, if I minimize foobar2000, the GPU usage is reduced to 0%. When I add foo_vis_spectrum_analyzer components to my setup and minimize fb2k, the GPU usage remains active when minimizing the app. Perhaps setting them to automatically freeze/unfreeze when minimized/unminimized? Idk I'm not a dev 😅

    3. Custom font size for styles that included text labels. Would this be a good idea? My implementation of your component is typically very narrow and long. The new graph labels appear quite large in comparison.

    4. Full screen. Double-clicking the component for full screen mode doesn't display the component with the active setup; it renders the default layout with (I think) color scheme Prism 1.

    5. If I've already requested this forgive me: Implementing profiles apart from color schemas that can be renamed, loaded, deleted, saved, and accessible across the various instances of the component. This would encompass saving all tweaks to the various settings.

    Anyway, I've finally deleted all my other third-party spectrum components. This has become my daily driver spectrum analyzer. Well done, and thank you!

    Edited: Supplied more feedback.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-25 21:05:36
    1. Color source. What's the intended behavior of setting a Color Source to None? For example, Configure > Styles > Graph Description > Color source: None. I cannot discern a difference between Color Source None and Color Source Solid. I assumed it would hide the element, but it doesn't.
    Yes, the intended behavior is that the visual element will not be drawn. If one is not obeying then it's a bug.

    2. GPU usage. I've noticed the most recent beta registers more GPU usage (per Task Manager), about 7%. Even when playback is paused the usage fluctuates that high. No changes were made to the config from the prior version. My setup has two spectrum windows running simultaneously. Freezing one does cut the usage in half. Anyway, just thought this might be relevant to report since the usage seems to have doubled or more from the prior version.
    To enable flipping and mirroring affine transformations are used. Not much optimization has been done but also, not much is possible. I'll have a look later.

    Edit: Another thing I've noticed. When using only the stock vis components, if I minimize foobar2000, the GPU usage is reduced to 0%. When I add foo_vis_spectrum_analyzer components to my setup and minimize fb2k, the GPU usage remains active when minimizing the app. Perhaps setting them to automatically freeze/unfreeze when minimized/unminimized? Idk I'm not a dev 😅
    The rendering is skipped when the component is hidden by another child window. I did not check what happens when I minimize the whole app. Will do later.

    3. Custom font size for styles that included text labels. Would this be a good idea? My implementation of your component is typically very narrow and long. The new graph labels appear quite large in comparison.
    The styles have that possibility but it's not exposed yet because it opens a whole new can of worms.

    4. Full screen. Double-clicking the component for full screen mode doesn't display the component with the active setup; it renders the default layout with (I think) color scheme Prism 1.
    That's because in DUI fb2k opens a second instance with it's own config while in CUI the existing window is resized.

    5. If I've already requested this forgive me: Implementing profiles apart from color schemas that can be renamed, loaded, deleted, saved, and accessible across the various instances of the component. This would encompass saving all tweaks to the various settings.
    It's on my To Do list. First I have to get this beta ready.

    Anyway, I've finally deleted all my other third-party spectrum components. This has become my daily driver spectrum analyzer. Well done, and thank you!
    Edited: Supplied more feedback.
    Thx. for the feedback
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-02-26 05:50:38
    Hey, pqyt. Two questions...

    1) In the top/left corner I see "Stereo". If I delete it, it still shows a 'cursor'. Can that be removed?
    2) In a future update is it possible to add a fill option for artwork? A lot of my artwork is small so the images have a window-boxed border. The fill option (like in ESLyrics for example) will take care of that.

    Thanks.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-26 06:21:56
    1) In the top/left corner I see "Stereo". If I delete it, it still shows a 'cursor'. Can that be removed?
    Already fixed in the next release.
    2) In a future update is it possible to add a fill option for artwork? A lot of my artwork is small so the images have a window-boxed border. The fill option (like in ESLyrics for example) will take care of that.
    Already implemented but not yet exposed to the GUI.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-02-26 09:11:14
    1) In the top/left corner I see "Stereo". If I delete it, it still shows a 'cursor'. Can that be removed?
    Already fixed in the next release.
    2) In a future update is it possible to add a fill option for artwork? A lot of my artwork is small so the images have a window-boxed border. The fill option (like in ESLyrics for example) will take care of that.
    Already implemented but not yet exposed to the GUI.

    Cool! Thanks for the quick reply.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-26 19:32:48
    v0.7.1.0-rc-1, 2024-02-26

    * New: The style of the graph description background can be specified.
    * New: A marker for the Nyquist frequency can be enabled on the Styles page.
    * Improved: The frequency tooltip tries to stay within borders of the component.
    * Fixed: The graph description will not be shown when it is left empty or when its color source is set to "None".
    * Fixed: The gradient brushes were not recreated when the graph was resized.
    * Fixed: X-axis scaling did not obey the selected scaling function.
    * Fixed: Most visual elements with color source "None" ignored the setting.

    You can download it only from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.1.0-rc-1) for now.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: brichanfiana on 2024-02-27 08:39:43
    foobar 2000 2.1.2 preview 0219 with v0.7.0-rc-1 Spectrum not displayed or crashes.
    Fourier Transform No. ofbins 32768 and 65536 ->Not Displayed. (PGGB-RT 352.8/384KHz Resampling)
    Sample rate based -> Crash foobar 2000.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-27 10:58:34
    foobar 2000 2.1.2 preview 0219 with v0.7.0-rc-1 Spectrum not displayed or crashes.
    Fourier Transform No. ofbins 32768 and 65536 ->Not Displayed. (PGGB-RT 352.8/384KHz Resampling)
    Sample rate based -> Crash foobar 2000.
    What happens if you reset the component's configuration? I haven't had a crash for a while.

    Edit: Confirmed for non-radix-2 FFT's. I'll issue a fix immediately. 32768 and 65536 should work.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-02-27 11:17:20
    I can easily reproduce the crash on a clean instance and changing the bins to sample rate based. This is bog standard 44100 - nothing fancy like the post above.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-27 12:08:24
    I can easily reproduce the crash on a clean instance and changing the bins to sample rate based. This is bog standard 44100 - nothing fancy like the post above.
    I edited my original reply. There's a regression for non-radix-2 FFT's, 32768 works without a problem (here); 65536 works but fb2k does not supply an audio chunk. I'll do some experimenting with the visualization stream to see if I can determine a valid range for the window size.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-02-27 12:56:37
    Yeah, I see you got in 3 minutes before I posted. I was too slow.

    Something else: flicker on resize - mind you, standard fb2k console and artwork panel are not good in that regard either. :D

    edit: sorry about being slow getting the splitter at the start. :/

    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-27 13:04:14
    Yeah, I see you got in 3 minutes before I posted. I was too slow.

    Something else: flicker on resize - mind you, standard fb2k console and artwork panel are not good in that regard either. :D
    The proverbial rock and a hard place: it was introduced when I fixed the 'startup' flash (white background when using dark mode) by erasing the background during startup instead of letting the render routine do it's thing a couple ms later. I'll see if I can come up with a solution before the release.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-27 13:06:29
    v0.7.1.0-rc-2, 2024-02-27

    * Fixed (Regression): Non-radix-2 FFT's caused a crash.

    You can download it only from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.1.0-rc-2) for now.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-02-27 14:20:58
    edit: load of twaddle removed. I can see your github has changes. :D
    Title: Re: foo_vis_spectrum_analyzer
    Post by: brichanfiana on 2024-02-27 19:25:14
    What happens if you reset the component's configuration? I haven't had a crash for a while.

    Edit: Confirmed for non-radix-2 FFT's. I'll issue a fix immediately. 32768 and 65536 should work.

    It now works with RC-2, but I think that Spectrum is not working correctly when using the PGGB-RT Plugin in the part that was changed from 0.7.0.0 to 0.7.1.0.
    32768 and 65536 did not work correctly on rc-1 when using the PGGB-RT.
    After the PGGB-RT Plugin reads a source such as FLAC, it performs resampling in pre-processing, the source changes from FLAC to PGGB-RT, and the sample rate and bit depth are also changed.
    I think that 0.7.0.0 took PGGB-RT information without problems with this operation, but 0.7.1.0 seems to make Spectrum based on information from the original FLAC source.

    pic 1: Pre-Processing PGGB-RT (Original Flac 1.4.3 24/96KHz)
    pic 2: Playing with PGGB-RT (32/384KHz)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-27 19:39:11
    What happens if you reset the component's configuration? I haven't had a crash for a while.

    Edit: Confirmed for non-radix-2 FFT's. I'll issue a fix immediately. 32768 and 65536 should work.

    It now works with RC-2, but I think that Spectrum is not working correctly when using the PGGB-RT Plugin in the part that was changed from 0.7.0.0 to 0.7.1.0.
    32768 and 65536 did not work correctly on rc-1 when using the PGGB-RT.
    After the PGGB-RT Plugin reads a source such as FLAC, it performs resampling in pre-processing, the source changes from FLAC to PGGB-RT, and the sample rate and bit depth are also changed.
    I think that 0.7.0.0 took PGGB-RT information without problems with this operation, but 0.7.1.0 seems to make Spectrum based on information from the original FLAC source.

    pic 1: Pre-Processing PGGB-RT (Original Flac 1.4.3 24/96KHz)
    pic 2: Playing with PGGB-RT (32/384KHz)

    I can't imagine what I could have changed between those versions that would cause a different usage of the sample rate. The sample rate is taken from the audio chunk as supplied by fb2k, over and over again; I assume post-processing.
    Before the first audio chunk arrives 44100Hz is assumed.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-02-27 23:25:55
    1) In the top/left corner I see "Stereo". If I delete it, it still shows a 'cursor'. Can that be removed?
    Already fixed in the next release.
    2) In a future update is it possible to add a fill option for artwork? A lot of my artwork is small so the images have a window-boxed border. The fill option (like in ESLyrics for example) will take care of that.
    Already implemented but not yet exposed to the GUI.

    One more feature request... The ability to have a custom image show, only when there is no artwork. I love that feature on ESLyric.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-02-28 00:13:52
    Maybe I'm doing something wrong (I haven't been using this long) but my style color is always reset when I reboot fb2k. For example if Bar Spectrum is set to Fire, when I reboot it's set to Prism 1.

    Although if I go back to Styles after a reboot, and click on Bar Spectrum, it will say Fire and give me the Fire colors. It just won't give me those colors unless I manually click on Styles/Bar Spectrum after a reboot.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: brichanfiana on 2024-02-28 03:46:56
    I can't imagine what I could have changed between those versions that would cause a different usage of the sample rate. The sample rate is taken from the audio chunk as supplied by fb2k, over and over again; I assume post-processing.
    Before the first audio chunk arrives 44100Hz is assumed.
    pic 1: This image shows the same song in 0.7.0.0 with foobar 2000 2.1.2 preview 0219 and the PGGB-RT plug-in in the same state.

    The source is 384KHz, so the range up to 192KHz and up to the upper Spectrum analyzer limit setting of 96KHz is well displayed, but I thought the previous 0.7.1.0-rc2 did not display above 48KHz (up to 96KHz) (see previous See Pic 2 in post).
    I have had similar symptoms since Beta1, but had repeatedly reverted back to 7.0.0.0, which is why I was late in reporting it.

    pic 2 PGGB-RT file details dialogue
    Unfortunately, the file information in PGGB-RT seems to bring the 24/96 Original Flac information.
    If it is taken from Audio Chunk, it will be displayed in the same way as Spectrum in v0.7.0.0, regardless of the PGGB-RT information.
    Furthermore, v0.7.1.0 only showed up to around 22KHz when playing 16/44KHz FLAC resampled to 32/352.8KHz on the PGGB-RT.

    It would be best if I could read the source code directly and report back, but I am also a developer and I am traumatised to read and write source code because I am mentally beaten.

    Sorry to add another report on v0.7.1.0 rc-2, but I have set the colour of the Spectrum Bar to Foobar 2000 Dark Mode, but after saving, I quit Foobar 2000 once, and after that, when I start Foobar 2000, the colour of the Spectrum Bar is displayed as Prism 1. The colour of the Spectrum Bar is displayed as Prism 1.
    The colour of the Spectrum Bar is set to Prism 1, but in Configure it is set to Foobar 2000 Dark Mode, so as soon as the Bar Colour is selected, it reverts to the original colour.
    However, when the Foobar 2000 is restarted again, the colour is Prism 1.

    Config Reset has also been tried, but the same symptoms occur.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-28 05:38:18
    Maybe I'm doing something wrong (I haven't been using this long) but my style color is always reset when I reboot fb2k. For example if Bar Spectrum is set to Fire, when I reboot it's set to Prism 1.

    Although if I go back to Styles after a reboot, and click on Bar Spectrum, it will say Fire and give me the Fire colors. It just won't give me those colors unless I manually click on Styles/Bar Spectrum after a reboot.
    Prism 1 is the default. It sounds like something goes wrong after saving the settings or during reading them. Have you tried changing the number of bins to a known non-standard value e.g. 77 and check if it's reset too?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-28 05:42:39
    I can't imagine what I could have changed between those versions that would cause a different usage of the sample rate. The sample rate is taken from the audio chunk as supplied by fb2k, over and over again; I assume post-processing.
    Before the first audio chunk arrives 44100Hz is assumed.
    pic 1: This image shows the same song in 0.7.0.0 with foobar 2000 2.1.2 preview 0219 and the PGGB-RT plug-in in the same state.

    The source is 384KHz, so the range up to 192KHz and up to the upper Spectrum analyzer limit setting of 96KHz is well displayed, but I thought the previous 0.7.1.0-rc2 did not display above 48KHz (up to 96KHz) (see previous See Pic 2 in post).
    I have had similar symptoms since Beta1, but had repeatedly reverted back to 7.0.0.0, which is why I was late in reporting it.

    pic 2 PGGB-RT file details dialogue
    Unfortunately, the file information in PGGB-RT seems to bring the 24/96 Original Flac information.
    If it is taken from Audio Chunk, it will be displayed in the same way as Spectrum in v0.7.0.0, regardless of the PGGB-RT information.
    Furthermore, v0.7.1.0 only showed up to around 22KHz when playing 16/44KHz FLAC resampled to 32/352.8KHz on the PGGB-RT.

    It would be best if I could read the source code directly and report back, but I am also a developer and I am traumatised to read and write source code because I am mentally beaten.
    The source has been available since the early versions.
    Sorry to add another report on v0.7.1.0 rc-2, but I have set the colour of the Spectrum Bar to Foobar 2000 Dark Mode, but after saving, I quit Foobar 2000 once, and after that, when I start Foobar 2000, the colour of the Spectrum Bar is displayed as Prism 1. The colour of the Spectrum Bar is displayed as Prism 1.
    The colour of the Spectrum Bar is set to Prism 1, but in Configure it is set to Foobar 2000 Dark Mode, so as soon as the Bar Colour is selected, it reverts to the original colour.
    However, when the Foobar 2000 is restarted again, the colour is Prism 1.

    Config Reset has also been tried, but the same symptoms occur.
    2 reports about the same bug. I'll see if I can reproduce it.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: brichanfiana on 2024-02-28 07:00:36
    The source has been available since the early versions.
    We are sorry that you were offended.
    I will continue to use v7.0.0.0.

    It is very hard for me to read and write source code due to depression at work, but I will try to follow it when I am feeling better.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-28 07:56:30
    The source has been available since the early versions.
    We are sorry that you were offended.
    I will continue to use v7.0.0.0.

    It is very hard for me to read and write source code due to depression at work, but I will try to follow it when I am feeling better.
    Don't worry, I'm not offended. I was just pointing out that if you have any insights or advice on the math I'm willing to listen. I think I know how to develop but I'm not an audio engineer.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-28 08:02:58
    v0.7.1.0-rc-3, 2024-02-28

    * Improved: Tweaked the background painting again to prevent flashes when resizing the component.
    * Fixed (Regression): The selected gradient color scheme was not activated after startup.

    You can download it only from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.1.0-rc-3) for now.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: brichanfiana on 2024-02-28 08:27:44
    Don't worry, I'm not offended. I was just pointing out that if you have any insights or advice on the math I'm willing to listen. I think I know how to develop but I'm not an audio engineer.
    Thank you for your concern.
    I am not an audio-related developer either, but a Windows Server/Client Software Engineer who is recovering from depression.
    I would like to add Skill in areas related to audio algorithms, etc., as they are my area of interest.

     I have summarised it in one image for clarity.
    I would like to report that there is such a difference in display between v0.7.1.0 rc-2 and 0.7.0.0 when playing back a source upsampled to 32/384KHz with the same version of foobar2000 2.2 Preview 02-19 and the same version of the PGGB-RT plug-in The following is a report of the difference in display between v0.7.1.0 rc-2 and 0.7.0.0.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Jackal29a on 2024-02-28 11:26:04
    @pqyt
    V.7.0.0 works great on both installed (1.6.17) and portable (2.2 preview x64) FBs on my W11Pro PC but none of the 7.0.1-xxx releases do even if configured identically.
    Any idea what could be the cause?
    TIA
    (BTW, fantastic plugin, thx)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-28 12:39:05
    @pqyt
    V.7.0.0 works great on both installed (1.6.17) and portable (2.2 preview x64) FBs on my W11Pro PC but none of the 7.0.1-xxx releases do even if configured identically.
    Any idea what could be the cause?
    I assume the color changes are not intentional?

    What I see is:
    - the peak indicators are rendered completely wrong. They're suppose to be only 1 pixel high.
    - The text is rendered weird.

    What changed is that the rendered data is transformed using D2D to support mirroring and flipping. Since this all happens on right angles this should basically only mean a sign or an offset change in the coordinates. The transformations are built into D2D.

    Are your GPU drivers up-to-date? What happens, as a test, if you flip the graph vertically or horizontally?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-28 13:02:07
    The following is a report of the difference in display between v0.7.1.0 rc-2 and 0.7.0.0.
    Assuming you did not change any of the X-axis parameters: RC1 fixed an old bug. The labels in linear mode were always calculated using log2() instead of using the selected scaling function. So the X-axis in RC1 and later should be correct.

    As to why the FFT bins stop at about 50kHz I don't have a clue yet.

    The problem is that your setup is a-typical. I don't have the upsampler you're using.

    I'll see how far I get with the built-in tone generator I put in for debugging.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-02-28 13:52:34
    I don't think there's anything wrong with the FFT bins. If the source material is 96 kHz there should not be anything above 48 kHz with high quality upsampling.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Jackal29a on 2024-02-28 15:43:51
    I assume the color changes are not intentional?
    They are not, they are supposed to be identical to the ones shown in the V7.0.0 clip. (Prism 1)

    What I see is:
    - the peak indicators are rendered completely wrong. They're suppose to be only 1 pixel high.
    - The text is rendered weird.
    I'd add that the the spectrum bars are also rendered wrong and behave as the peaks (hold time & accelaration).

    What changed is that the rendered data is transformed using D2D to support mirroring and flipping. Since this all happens on right angles this should basically only mean a sign or an offset change in the coordinates. The transformations are built into D2D.

    Are your GPU drivers up-to-date? What happens, as a test, if you flip the graph vertically or horizontally?

    I'm using integrated grpahics (i7-9700 i.e. Intel UHD 630) with latest drivers.
    Fliping also renders the image incorrectly but full scren works fine though lines and text are not as sharp as with v7.0.0.

    EDIT:
    l think I found the culprit. I had Graph Background set to "none", changing it to anything but restores correct rendering. This works fine in V7.0.0
    Still, line edges in 7.0.1 are not as well defined/sharp as in 7.0.0
    Title: Re: foo_vis_spectrum_analyzer
    Post by: brichanfiana on 2024-02-28 16:34:49
    I'll see how far I get with the built-in tone generator I put in for debugging.
    In this setting, the X-axis is specified as 5Hz~96KHz and is not changed in 0.7.1.0 and 0.7.0.0.
    However, we are not confident about the settings around the algorithm, as we had to repeatedly reconfigure the settings because they were initialised when we reverted to v0.7.0.0.
    I thought I had reported the symptoms of the Bar not displaying. Sorry again for not adding more.

    When PGGB-RT resampling a 16/44KHz source, v0.7.1.0 the Bar stops at around 22KHz.
    This is one of the reasons why we thought that there might have been some changes.

    Sorry for the difficult symptom report.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-02-29 08:36:00
    v0.7.1.0-rc-3, 2024-02-28

    * Improved: Tweaked the background painting again to prevent flashes when resizing the component.
    * Fixed (Regression): The selected gradient color scheme was not activated after startup.

    You can download it only from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.1.0-rc-3) for now.

    "The selected gradient color scheme was not activated after startup."

    This is still not fixed. Oddly, it was working yesterday when I installed it but today it's back to not remembering again. When I launch fb2k I have to click on the Style I'm using to get it to work. The other color sources work fine.

    EDIT... It's just the Custom Color Scheme that doesn't work. The others do.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-29 12:10:48
    v0.7.1.0-rc-3, 2024-02-28

    * Improved: Tweaked the background painting again to prevent flashes when resizing the component.
    * Fixed (Regression): The selected gradient color scheme was not activated after startup.

    You can download it only from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.1.0-rc-3) for now.

    "The selected gradient color scheme was not activated after startup."

    This is still not fixed. Oddly, it was working yesterday when I installed it but today it's back to not remembering again. When I launch fb2k I have to click on the Style I'm using to get it to work. The other color sources work fine.

    EDIT... It's just the Custom Color Scheme that doesn't work. The others do.
    Duh. I really should start using my own support routines. It'll be fixed in the release version.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MaFred on 2024-02-29 14:23:01
    With 2-channel stereo, no peak indicator is displayed in the right channel.

    Thanks for your great work!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-29 15:28:30
    With 2-channel stereo, no peak indicator is displayed in the right channel.

    Thanks for your great work!
    Confirmed. But only when vertically stacked. I'll investigate.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: metal_termite on 2024-02-29 18:35:26
    Testing rc3. Upgraded from beta 2 to rc3. It had issues with the beta2 layout it inherited. In my best laymans guess, it looked like it wasn't correctly rendering elements that had opacity less than 100% 🤷 I used the reset button, the issues persisted. I removed the component's UI element and readded it, which seemed to resolve the issue.

    There does seem to be a bug with the reset button. To reproduce: context menu > configure > Styles > Click reset button. The configure modal window will flash, then if you go back to the styles section you'll see the list of styles has a duplicate list of entries. You can keep doing this behavior and the list of styles will keep incrementing a duplicate list indefinitely.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-29 19:18:58
    v0.7.1.0, 2024-02-29

    * Changed: To avoid confusion color source None for the background has been disabled until it can be properly implemented.
    * Fixed: Reversing the colors of a gradient did not recalculate the position of the colors. Instead it spread out the colors evenly.
    * Fixed (Regression): The peak indicators on the bar graph weren't rendered.

    You can download it from Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or upgrade from within foobar2000.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-29 19:20:11
    Testing rc3. Upgraded from beta 2 to rc3. It had issues with the beta2 layout it inherited. In my best laymans guess, it looked like it wasn't correctly rendering elements that had opacity less than 100% 🤷 I used the reset button, the issues persisted. I removed the component's UI element and readded it, which seemed to resolve the issue.

    There does seem to be a bug with the reset button. To reproduce: context menu > configure > Styles > Click reset button. The configure modal window will flash, then if you go back to the styles section you'll see the list of styles has a duplicate list of entries. You can keep doing this behavior and the list of styles will keep incrementing a duplicate list indefinitely.
    As you can see, I just released 0.7.1.0. I'll look into it.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-02-29 19:37:22
    Testing rc3. Upgraded from beta 2 to rc3. It had issues with the beta2 layout it inherited. In my best laymans guess, it looked like it wasn't correctly rendering elements that had opacity less than 100% 🤷 I used the reset button, the issues persisted. I removed the component's UI element and readded it, which seemed to resolve the issue.

    There does seem to be a bug with the reset button. To reproduce: context menu > configure > Styles > Click reset button. The configure modal window will flash, then if you go back to the styles section you'll see the list of styles has a duplicate list of entries. You can keep doing this behavior and the list of styles will keep incrementing a duplicate list indefinitely.
    As you can see, I just released 0.7.1.0. I'll look into it.
    It's just a bug in the dialog. The listbox is not cleared before it's filled again. The style entries are still uniquely defined. I'll release a point release after the inevitable release bug reports have come in.

    Any more details on the opacity problem: which element? Which opacity value?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: metal_termite on 2024-02-29 20:39:09
    Any more details on the opacity problem: which element? Which opacity value?

    Unfortunately no, and those assertions were just my best guess, I could be wrong about what aspect of the rendering was dysfunctional. In retrospect I should have recorded a short clip which I will do going forward if I encounter issues like that.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MaFred on 2024-03-01 09:21:26
    Thank you for v7.1.0.
    Unfortunately the Xaxis text is broken.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-01 11:41:11
    Thank you for v7.1.0.
    Unfortunately the Xaxis text is broken.
    I'm unable to reproduce this. I tried different settings and different scaling functions, even with linear scaling like you seem to use.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MaFred on 2024-03-01 13:53:47
    I have just noticed that the text is OK with a separate Spectrum for the right and left channels, but not with a Spectrum that contains both stereo channels!
    After resetting and setting up the settings again, the problem occurs again...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-01 18:21:05
    I have just noticed that the text is OK with a separate Spectrum for the right and left channels, but not with a Spectrum that contains both stereo channels!
    After resetting and setting up the settings again, the problem occurs again...
    Your right picture: if the settings are:

    - Distribution: Linear
    - Scaling: Linear
    - X-axis: Decades

    then everything is working as designed.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-03-01 20:46:12
    Testing 0710 release after having stuck with 0600.  I noticed a bug in 0710's bar spectrum color scheme display--when Prism 1 is selected, although the gradient in the dialog shows red on top and dark blue on bottom, as it does in version 0600, during actual playback red is on the bottom of the bars and dark blue at the top.  See attached images.

    You could say "well just hit the "Reverse" button in 0710 to correct it," but this produces a display visually unlike the correct rendition in 0600 (blue range becomes too indistinct towards the bottom).

    Hopefully this was just an oversight and would be an easy fix?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-01 21:53:54
    Testing 0710 release after having stuck with 0600.  I noticed a bug in 0710's bar spectrum color scheme display--when Prism 1 is selected, although the gradient in the dialog shows red on top and dark blue on bottom, as it does in version 0600, during actual playback red is on the bottom of the bars and dark blue at the top.  See attached images.

    You could say "well just hit the "Reverse" button in 0710 to correct it," but this produces a display visually unlike the correct rendition in 0600 (blue range becomes too indistinct towards the bottom).
    Hopefully this was just an oversight and would be an easy fix?
    You're right. That's because the graph is now rendered upside down and then flipped, unless the user selects "Flip Vertically". Sounds confusing but mathematically it makes sense.

    I'll reverse the colors before creating the brush. That way the GUI stays consistent.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MaFred on 2024-03-01 22:04:56
    Your right picture: if the settings are:
    - Distribution: Linear
    - Scaling: Linear
    - X-axis: Decades
    then everything is working as designed.

    Unfortunately, it doesn't look any better for me with this setting...
    Maybe it's because of CUI , or because I have two instances installed? I'm at a loss...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-01 22:15:33
    Your right picture: if the settings are:
    - Distribution: Linear
    - Scaling: Linear
    - X-axis: Decades
    then everything is working as designed.

    Unfortunately, it doesn't look any better for me with this setting...
    Maybe it's because of CUI , or because I have two instances installed? I'm at a loss...
    You understood me wrong: why are you using linear Scaling mode? Most spectrum analyzers use Logarithmic by default.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MaFred on 2024-03-01 22:59:21
    You understood me wrong: why are you using linear Scaling mode? Most spectrum analyzers use Logarithmic by default.
    Yes, I misunderstood that, sorry. If I set Scaling to Linear, the text scale is displayed correctly. Thank you!
    I had used the same settings for both Spectrums. Strangely enough, this led to a completely different result for the Spectrum with both stereo channels.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: bsdinis on 2024-03-02 01:03:37
    great, the freezing has been fixed... for non-fullscreen mode... sorry to say this, but this component is a bugfest
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-03-02 01:30:55
    great, the freezing has been fixed... for non-fullscreen mode... sorry to say this, but this component is a bugfest

    You know ... It's beta. And it is called beta for a reason. Nobody requires you to install it and expose yourself to bugs.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-02 06:24:18
    great, the freezing has been fixed... for non-fullscreen mode... sorry to say this, but this component is a bugfest
    Great! Looking forward to your bug reports so that I can fix them. Oh, wait,... you're just whining...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-03-02 08:34:26
    Unfortunately I have another bug report for 0710.  When the X-axis frequency scale (distribution linear, scaling logarithmic) is set for an upper limit past about 24 kHz, instead of an expected fall-off before that point, a space/"notch" appears and frequency bars start appearing again where none should be.  In version 0600, this does not happen--a fall-off occurs and then no more activity is shown.  This is with normal music, not a test wave, etc.  The images below aren't from the the same exact moment but are representative of an entire song.  They show the X-axis set for 26 kHz max, first from 0600 and then 0710:
    (https://i.imgur.com/QxaD4oP.png)   (https://i.imgur.com/4SCxVPQ.png)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-02 10:28:13
    Unfortunately I have another bug report for 0710.  When the X-axis frequency scale (distribution linear, scaling logarithmic) is set for an upper limit past about 24 kHz, instead of an expected fall-off before that point, a space/"notch" appears and frequency bars start appearing again where none should be.  In version 0600, this does not happen--a fall-off occurs and then no more activity is shown.  This is with normal music, not a test wave, etc.  The images below aren't from the the same exact moment but are representative of an entire song.  They show the X-axis set for 26 kHz max, first from 0600 and then 0710:
    (https://i.imgur.com/QxaD4oP.png)   (https://i.imgur.com/4SCxVPQ.png)
    Did you disable the "Common / Suppress mirror image" flag? It was a feature request to show the amplitudes of frequencies above the Nyquist frequency. Default is to suppress the mirror image.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-03-02 19:34:08
    That was it, thank you!  BTW, on my install of 0710 the option to "Suppress mirror image" was un-checked by default.

    Edit:  the reversed gradient color bars with Prism 1 issue is indeed fixed with github release 0720-alpha 1, great.  Just installed it on top of 0710 and so far all is well.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-03-03 03:39:55
    for @pqyt does it make sense to have default settings of this component having the same color gradient, foreground and background colors as fb2k's built-in spectrum visualization something like this (https://youtube.com/watch?v=G6YZKf_XZYg)(this YT video shows the colorscheme matching the fb2k built-in Spectrum in dark mode, but this color scheme depends on the current DUI/CUI colorschemes just like built-in visualizations in foobar2000) instead of a custom gradient one like the original foo_musical_spectrum?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-03 11:09:17
    for @pqyt does it make sense to have default settings of this component having the same color gradient, foreground and background colors as fb2k's built-in spectrum visualization something like this (https://youtube.com/watch?v=G6YZKf_XZYg)(this YT video shows the colorscheme matching the fb2k built-in Spectrum in dark mode, but this color scheme depends on the current DUI/CUI colorschemes just like built-in visualizations in foobar2000) instead of a custom gradient one like the original foo_musical_spectrum?
    The color schemes are in there but I'm not a fan of making them the default.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Sergey77 on 2024-03-03 14:11:16
    ^When the color scheme is "Artwork" and a track does not have an album cover, the color scheme of the graph will be different from the color scheme of other layout elements.
    In this case, I think it makes sense to define a default color scheme (i.e. when there is no cover).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-03 15:09:14
    ^When the color scheme is "Artwork" and a track does not have an album cover, the color scheme of the graph will be different from the color scheme of other layout elements.
    In this case, I think it makes sense to define a default color scheme (i.e. when there is no cover).
    When no artwork is found, it falls back to a gradient of black to white.

    What do you mean: different from other elements? Do those elements also have the Gradient / Artwork color source?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-03 15:46:20
    v0.7.2.0, 2024-03-03

    * New: Analog-style spectrum analysis. Based on https://codepen.io/TF3RDL/pen/MWLzPoO.
    * Improved: Performance optimization. Rendering will stop when the main window is minimized.
    * Improved: Small performance optimization in SWIFT.
    * Changed: The grid lines can be displayed without an X or Y-axis.
      * X-axis and Y-axis mode "None" still disables everything.
      * The X-axis or Y-axis labels can be controlled with the top, bottom, left and right settings.
      * The X-axis Line and Y-axis Line style have been renamed to Vertical and Horizontal Grid Line.
    * Fixed: The style list box in the configuration dialog was not cleared before it was filled again after a reset.
    * Fixed (Regression): Gradient brushes are created again with the colors in the same order as shown in the configuration dialog.

    You can download it from Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or upgrade from within foobar2000.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-03 15:52:37
    I'm thinking of compiling the next versions with Advanced Vector Extensions 2 (AVX2) instructions enabled. This would mean that the CPU in your computer should be released in 2013 or later (10 years ago, Intel Haswell).

    Is that an unreasonable requirement?

    I'm hoping for a civil discussion...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Sergey77 on 2024-03-03 16:16:17
    When no artwork is found, it falls back to a gradient of black to white.

    What do you mean: different from other elements? Do those elements also have the Gradient / Artwork color source?
    In "Dark Mode" when the "Dark" color scheme is defined. Stock visualization elements such as "Peak Meter", "Spectrum", "VU Meter" are not black and white. But this is like an explanation that if there no cover, the color scheme of the component could be not only black and white.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Sergey77 on 2024-03-03 16:55:39
    v0.7.2.0, 2024-03-03

    * New: Analog-style spectrum analysis. Based on https://codepen.io/TF3RDL/pen/MWLzPoO.
    * Improved: Performance optimization. Rendering will stop when the main window is minimized.
    * Improved: Small performance optimization in SWIFT.
    * Changed: The grid lines can be displayed without an X or Y-axis.
      * X-axis and Y-axis mode "None" still disables everything.
      * The X-axis or Y-axis labels can be controlled with the top, bottom, left and right settings.
      * The X-axis Line and Y-axis Line style have been renamed to Vertical and Horizontal Grid Line.
    * Fixed: The style list box in the configuration dialog was not cleared before it was filled again after a reset.
    * Fixed (Regression): Gradient brushes are created again with the colors in the same order as shown in the configuration dialog.

    You can download it from Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or upgrade from within foobar2000.
    The component is awesome!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-03-03 21:58:15
    Agreed.  I finally moved on from my jitter fears since 0600 after being able to set this new version up for flawless (to me) performance.  The other players I use (MusicBee and AIMP) have nothing remotely comparable.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-03-04 00:14:16
    * New: Analog-style spectrum analysis. Based on https://codepen.io/TF3RDL/pen/MWLzPoO.
    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

    BTW, I think it is fine to deviate from ANSI S1.11-2004 (https://archive.org/details/gov.law.ansi.s1.11.2004/page/n2/mode/1up) standard for octave bands spectrum analyzer not based on FFT as it is a visualization component after all (though it can be configured to do something more useful), but I think making the IIR filter bank ANSI-compliant would benefit for an another spectrum analyzer component like Enhanced Spectrum analyzer (foo_enhanced_spectrum_analyzer) component by @Crossover

    I'm thinking of compiling the next versions with Advanced Vector Extensions 2 (AVX2) instructions enabled. This would mean that the CPU in your computer should be released in 2013 or later (10 years ago, Intel Haswell).

    Is that an unreasonable requirement?

    I'm hoping for a civil discussion...

    Well, that could be the new but unreasonable requirement unless a proper fallback to SSE4.2 down to SSE2 is implemented for compatibility (at the expense of performance obviously for low-end CPUs)

    Sure, the constant-Q sliding DFT and even analog-style analyzer can benefit from use of SIMD instructions (especially something like AVX2)

    BTW, since I have the version 0.5.0.1 of this component, would the configuration of this component be reset if I upgrade this to the latest version (currently v0.7.2.0) as it might have breaking changes down the line since the old version of this I've have?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-04 05:50:03
    BTW, since I have the version 0.5.0.1 of this component, would the configuration of this component be reset if I upgrade this to the latest version (currently v0.7.2.0) as it might have breaking changes down the line since the old version of this I've have?
    I took care to provide upgrade paths and conversion routines along the way. It's not pretty code but it should work.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-03-04 18:10:01
    Unfortunately I have another bug report for 0710.  When the X-axis frequency scale (distribution linear, scaling logarithmic) is set for an upper limit past about 24 kHz, instead of an expected fall-off before that point, a space/"notch" appears and frequency bars start appearing again where none should be.  In version 0600, this does not happen--a fall-off occurs and then no more activity is shown.  This is with normal music, not a test wave, etc.  The images below aren't from the the same exact moment but are representative of an entire song.  They show the X-axis set for 26 kHz max, first from 0600 and then 0710:
    (https://i.imgur.com/QxaD4oP.png)   (https://i.imgur.com/4SCxVPQ.png)
    Did you disable the "Common / Suppress mirror image" flag? It was a feature request to show the amplitudes of frequencies above the Nyquist frequency. Default is to suppress the mirror image.


    Hi,
    please excuse my lack of knowledge but can a file that is 44,1/24 show "mirror frequencies" higher than the sampling rate? If I enable the mirror option in your componet it shows freqs up till 96kHz. This seems strange.
    On the other hand if I play SACDISO and suppress mirror freqs it shows bars only to about 22,05kHz which is the more strange because of sacd specifications (and I use Native DSD streaming via USB to DAC so no PCM conversion and no filters/limiters etc.; plus I use 192/24 freq just for visualisation purpose - so why there is nothing in the spectrum - everything above 22,05 is hidden as mirror freqs).

    Title: Re: foo_vis_spectrum_analyzer
    Post by: Xin-Hong on 2024-03-04 19:49:56
    This plugin becomes better and better, thank you :)

    I have a strange behaviour with bar mode and alpha transparency, it looks like the LED mode don't manage transparency like bar mode.

    Bar mode:
    X

    LED mode:
    X

    Request:
    For me the LEDs are a bit too thick, is it possible in a future developpement to reduce or adjust their size like this example ?
    X

    Thanks
    Title: Re: foo_vis_spectrum_analyzer
    Post by: metal_termite on 2024-03-04 23:30:40
    I'm trying to emulate the spectrum analyzer aesthetic from Cyberpunk 2077 (https://staticdelivery.nexusmods.com/mods/3333/images/headers/11723_1702939845.jpg).

    I've basically done it by differentiating the color for the peak indicator, and setting peak mode to Gravity; Hold time to 0; Acceleration to 2. I'm not sure how accurate that is to achieving an actual curve line type visualization for bar mode, but aesthetically it kinda works. If it's a minor addition, consider adding a bar line style.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-05 06:01:07
    This plugin becomes better and better, thank you :)

    I have a strange behaviour with bar mode and alpha transparency, it looks like the LED mode don't manage transparency like bar mode.

    Bar mode:
    [attach type=thumb]29547[/attach]

    LED mode:
    [attach type=thumb]29549[/attach]

    Request:
    For me the LEDs are a bit too thick, is it possible in a future developpement to reduce or adjust their size like this example ?
    [attach type=thumb]29551[/attach]

    Thanks
    The 'LED's are created simply by overwriting the bar with a separate brush the erases every other line of pixels. From a performance point of view it was very inexpensive.

    I'll do some research to see if I can improve the look without impacting performance too much.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-05 06:03:30
    I'm trying to emulate the spectrum analyzer aesthetic from Cyberpunk 2077 (https://staticdelivery.nexusmods.com/mods/3333/images/headers/11723_1702939845.jpg).

    I've basically done it by differentiating the color for the peak indicator, and setting peak mode to Gravity; Hold time to 0; Acceleration to 2. I'm not sure how accurate that is to achieving an actual curve line type visualization for bar mode, but aesthetically it kinda works. If it's a minor addition, consider adding a bar line style.
    Can you get me a better picture of it? It think it's not as simple as rendering a curvy line. That would also be expensive performance wise.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: StuPC on 2024-03-05 14:00:50
    Thanks so much for all your hard work on this, it keeps getting better and better!

    Is there functionality for users to save and share their setups so they can be imported into other foobar installs?
    I would love to try out some of the ones being discussed on here (without having to individually adjusting all the settings).
    -StuPC

    p.s. my setup attached
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-05 15:37:01
    Thanks so much for all your hard work on this, it keeps getting better and better!

    Is there functionality for users to save and share their setups so they can be imported into other foobar installs?
    I would love to try out some of the ones being discussed on here (without having to individually adjusting all the settings).
    -StuPC

    p.s. my setup attached
    Working on it. Actually, it's finished but I want to put some other stuff in the next release.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-03-06 17:28:03
    Feature request: dark mode aware tooltips. You may already know how but if not...

    https://hydrogenaud.io/index.php/topic,116045.msg1029913.html#msg1029913
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-03-06 17:57:48
    I'm trying to emulate the spectrum analyzer aesthetic from Cyberpunk 2077 (https://staticdelivery.nexusmods.com/mods/3333/images/headers/11723_1702939845.jpg).

    I've basically done it by differentiating the color for the peak indicator, and setting peak mode to Gravity; Hold time to 0; Acceleration to 2. I'm not sure how accurate that is to achieving an actual curve line type visualization for bar mode, but aesthetically it kinda works. If it's a minor addition, consider adding a bar line style.
    Can you get me a better picture of it? It think it's not as simple as rendering a curvy line. That would also be expensive performance wise.
    I updated the reference point (https://codepen.io/TF3RDL/pen/poQJwRW); I've added the peak line mode for the bars and LED mode, which is something @metal_termite wants

    BTW, wouldn't just setting the tuning frequency to 1kHz automatically makes one third octave bands compliant with ANSI standards (https://archive.org/details/gov.law.ansi.s1.11.2004) in terms of band center frequencies or is it?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: servimo on 2024-03-06 19:12:02
    I use foobar2000-64bits (portable mode) with Wine in Linux, but this version of  foo_vis_spectrum_analyzer: 0.7.2.0, isn't working. If I change to version 0.7.1.0 it shows the bars and looks great. Maybe it's the configuration that changed between versions, where they are stored?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: metal_termite on 2024-03-06 19:26:18
    Can you get me a better picture of it? It think it's not as simple as rendering a curvy line. That would also be expensive performance wise.

    Unfortunately, that's the best I could provide. This is my setup https://i.ibb.co/VMKfVsb/Animation.webp that attempts to emulate my goal, but it's not quite right (because it's obviously using peak indicators that lag behind). If I can attempt to rephrase the look I'm attempting to emulate, basically the top row of each rendered bar at any given point is always a distinct color.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: servimo on 2024-03-07 02:29:25
    I use foobar2000-64bits (portable mode) with Wine in Linux, but this version of  foo_vis_spectrum_analyzer: 0.7.2.0, isn't working. If I change to version 0.7.1.0 it shows the bars and looks great. Maybe it's the configuration that changed between versions, where they are stored?
    In the 32bits works like a charm.

    *** Sorry for this, I reinstalled version 0.7.2.0 in 64bits foobar2000 and,,, it worked. So, no problem. It's only in my computer maybe.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-03-09 01:49:27
    Feature request: Options to use more accurate peak decay and main bar time smoothing; decouple peak decay times and rate from FPS (for all analyzers) and/or making the calculation of peak decay and main bar time smoothing to be done during calculation, not as a post-processing effect (time-domain filter bank-based analyzers (https://codepen.io/TF3RDL/pen/MWLzPoO) only, but includes conventional/FIR-based sliding DFT obviously)

    I also suggest a new peak mode "Analysis", where calculation of spectral peaks is done before transformation to dB or nth root (just like main bar time smoothing does, which is done before log-amplitude/nth root transformation), so it decays exponentially when viewed with linear amplitude scale and linearly when viewed in logarithmic amplitude scale, which is more in-line with @Crossover's Enhanced Spectrum analyzer (foo_enhanced_spectrum_analyzer) component except the peak hold is in ticks per 60FPS (actually it can vary if the option to untie peak decay/time smoothing from FPS is turned off) instead of milliseconds and decay rate is not dB/second and instead it follows the AnalyserNode.smoothingTimeConstant's metric
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-09 15:20:15
    Can you get me a better picture of it? It think it's not as simple as rendering a curvy line. That would also be expensive performance wise.

    Unfortunately, that's the best I could provide. This is my setup https://i.ibb.co/VMKfVsb/Animation.webp that attempts to emulate my goal, but it's not quite right (because it's obviously using peak indicators that lag behind). If I can attempt to rephrase the look I'm attempting to emulate, basically the top row of each rendered bar at any given point is always a distinct color.
    @metal_termite,

    the next version will have a few extra styles that will make it more easier to emulate that effect.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-09 20:14:32
    v0.7.3.0, 2024-03-09

    * New: Presets.
      * The configuration of the component can be written to and read from preset files (*.fvsa).
      * The default location of the preset files is the root of your profile directory but this can be changed.
    * New: Extra styles.
      * Bar Area: The new name for the Bar Spectrum style.
      * Bar Top: Defines the style for the top of the spectrum bar. Defaults to color source None for backwards compatibility.
      * Peak Area: Defines the style for the area below the peak indicator. Defaults to color source None for backwards compatibility.
      * Peak Top: The new name for the Peak Indicator style.
    * Improved: LED mode properly renders the 'LEDs' as blocks.
    * Improved: The font of the graph description can be specified.
    * Improved: Dark mode tooltips.
    * Fixed: Multiple controls were not updated when switching graphs in the configuration dialog.

    You can download it from Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or upgrade from within foobar2000.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-03-10 12:55:30
    Thanks for the updated tooltips. Minor niggle: they don't track dark mode being toggled on/off. :P

    Also, the "User Interface" colours don't seem to work. This is what I'm trying/hoping would work...

    Styles>Graph Background
    Color Source>User interface
    Color Index>Background

    It's not picking up my Default UI background colour - I've not tested CUI.

    And IMHO, while User interface is selected, the colour picker should be unavailable.

    edit: I have all grid lines/text labels off and I was previously using a fixed solid colour which is fine.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-10 13:45:50
    Also, the "User Interface" colours don't seem to work. This is what I'm trying/hoping would work...
    The colors get grabbed when the component is created. I'm not comfortable with the whole hook/callback mechanism from DUI and CUI yet. Feels unnatural to me.

    Edit: DUI reacts to ui_element_notify_colors_changed but does not notify the configuration dialog yet when it's open.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-03-10 17:42:48
    I just did an update to 0730 over my existing 0720, and without changing anything I noticed right away that the spectrum bars now show a larger "gap" about every 8 bars that was not there in 0720;  the latter shows an even, "normally thin" space between all the bars down the spectrum (prism1, black background).

    I have no idea where to begin changing settings to affect this, so thought I'd submit it as-is to see if it immediately "strikes a bell" with you as to the cause.  Thanks for any insight.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-03-10 22:03:27
    Sorry, a couple of screenshots would have been a good idea:

    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-11 05:31:31
    Sorry, a couple of screenshots would have been a good idea:
    Rounding errors. I think I'm going to switch to integer numbers for the x-axis because whatever I do there's always something off.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Xin-Hong on 2024-03-11 06:43:49
    Thank you for all these corrections and enhancements, the LED style is better :)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-03-11 07:08:46
    Sorry, a couple of screenshots would have been a good idea:
    Rounding errors. I think I'm going to switch to integer numbers for the x-axis because whatever I do there's always something off.
    OK, thank you for a future fix!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-03-11 08:06:02
    Hi,
    I encounter a strange bahaviour of this component.
    I use this component as a pop-up (I start it for a while just to see what is happening in the file and close it).
    1. If I play a file and then start the component, the artwork does not show as a background. It only shows if I leave it working till the end of the file and the begining of the next (the artwork shows when the next file starts). But if I close the component and then start it again, the artwork usually is not there again till the start of the next file.
    2. If I play an audio file with higher frequency than 44,1 and then start the component the red vertical line showing Nyquist is always at 22,05 (no matter if the file is 44,1, 48, 88,2, 96 or 192). But if I leave  it till the begining of the next file the red line becomes proper (in proper position).
    3. If I see the artwork in the background and proper Nyquist line and change the dimensions of the window (ex. make it full-screen) - the artwork vanishes and the Nyquist line returns to 22,05 (regardless of the file resolution). In order to make it proper I have to wait till the next file or restart the file.
    Those cases show that those features only work properly if the component is started before the actual file starts. It would be nice to be able to make it work properly all the time.
    4. Sometimes - very randomly, so I can't think of any reason - the artwork just does not want to be shown no matter what I do or don't do. And sometimes the same artwork with the same file just shows properly. And it is not the same problem as in point 1.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-11 16:01:40
    1. If I play a file and then start the component, the artwork does not show as a background. It only shows if I leave it working till the end of the file and the begining of the next (the artwork shows when the next file starts). But if I close the component and then start it again, the artwork usually is not there again till the start of the next file.
    That's because I use a fb2k service that notifies all subscribers when new artwork is available to prevent all components from hitting the playing track at the same time. You loose the artwork because when you re-open the window it is a new instance that has not gotten the notification yet.
    2. If I play an audio file with higher frequency than 44,1 and then start the component the red vertical line showing Nyquist is always at 22,05 (no matter if the file is 44,1, 48, 88,2, 96 or 192). But if I leave  it till the begining of the next file the red line becomes proper (in proper position).
    A caching and optimization issue. I'll look into it.
    3. If I see the artwork in the background and proper Nyquist line and change the dimensions of the window (ex. make it full-screen) - the artwork vanishes and the Nyquist line returns to 22,05 (regardless of the file resolution). In order to make it proper I have to wait till the next file or restart the file.
    Those cases show that those features only work properly if the component is started before the actual file starts. It would be nice to be able to make it work properly all the time.
    In DUI fullscreen mode is a new instance of the component. That's how fb2k has implemented it. In CUI the window of the existing instance gets resized.
    4. Sometimes - very randomly, so I can't think of any reason - the artwork just does not want to be shown no matter what I do or don't do. And sometimes the same artwork with the same file just shows properly. And it is not the same problem as in point 1.
    See higher explanation. There is a service to request the artwork at anytime. I'll see if I can detect the conditions to use it without impacting overall performance too much.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-03-11 16:48:04
    The easiest way to get it on demand is with this..

    Code: [Select]
    album_art_data_ptr data = now_playing_album_art_notify_manager::get()->current();
    if (data.is_valid())
    {
    // make a WICBitmap or something
    }

    To solve the problem reported, I think doing it inside your WM_CREATE handler would be fine. I hammer zillions of different SDK apis from there in my horrible javascript-y component. Retrieving images is cheap, it's what you do with it that can matter.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: FartMasterExtreme on 2024-03-13 05:19:45
    Hi and thanks for an excellent tool. is it possible to use this extension just like you would use a spectral analyzer software such as spek (https://www.spek.cc/)

    for example, when i analyze this flac track using spek the visuals look like this: https://i.postimg.cc/c1ggnBSz/spekvisual.png

    and this is how the same track looks like using your extension: https://i.postimg.cc/cJL64QhX/foobarextension.png

    what i want is for the extension to look like the app spek.exe. is this possible?

    thhanks in advance

    PS. so my use function for this extension will be to spot lossy/lossless files.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-13 06:40:59
    is it possible to use this extension just like you would use a spectral analyzer software such as spek (https://www.spek.cc/)
    While there's are a lot of accurate math in there courtesy of @TF3RDL the component is not re-calibrated with every iteration. Thread carefully.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-13 16:56:37
    Hi and thanks for an excellent tool. is it possible to use this extension just like you would use a spectral analyzer software such as spek (https://www.spek.cc/)
    @FartMasterExtreme ,

    I had a closer look at Spek. Spek shows a spectogram. foo_vis_spectrum_analyzer does not have that visualization yet but I'm working on it.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-13 18:25:54
    v0.7.4.0, 2024-03-13

    * New: Amplitude-based color selection.
      * The colors of the spectrum bars can be set based on the amplitude of the frequency when using a horizontal gradient.
      * The colors of the current gradient are used to create a color list. Works with fixed, custom and artwork-based gradients.
      * Only the Bar Area and Bar Peak Area styles support this feature.
    * Improved: Gradient editing
      * Adding a color to a gradient will no longer recalculate the position of all colors. The added color will get a position between its predecessor and successor.
      * Removing a color from a gradient will leave all remaining positions untouched.
    * Fixed: The user interface colors and Windows colors were not consistently used and updated after the introduction of styles.
    * Fixed: Several minor fixes and tweaks to clean up inconsistencies and rough edges.

    You can download it from Components (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or upgrade from within foobar2000.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-03-13 23:20:14
    Just let Foobar update 0720 to 0740 on 1.6.17 and x64 v2.2--spectrum bars are now totally evenly spaced, thanks!  The save presets ability is also a real relief.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-03-14 07:30:56
    Hi,

    I have recently had a few (about 5) crashes of foobar when listening to SACDiso and using this component. Crash reports sent to foobar. WIN10, FB2.1.2/64, always latest official version of component (it happened only recently so it must have been last 2 or 3 versions of the component).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MaFred on 2024-03-14 09:18:33
    After updating from v0.7.4.0-alpha-2 to v0.7.4.0 foobar crashes and is no longer executable.
    Had to use the "foo_vis_spectrum_analyzer.dll" from my last system backup to get foobar running again.
    (foobar2000 v2.2 preview 2024-03-08 and CUI)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: mycroft on 2024-03-14 11:18:55
    Hi and thanks for an excellent tool. is it possible to use this extension just like you would use a spectral analyzer software such as spek (https://www.spek.cc/)

    for example, when i analyze this flac track using spek the visuals look like this: https://i.postimg.cc/c1ggnBSz/spekvisual.png

    and this is how the same track looks like using your extension: https://i.postimg.cc/cJL64QhX/foobarextension.png

    what i want is for the extension to look like the app spek.exe. is this possible?

    thhanks in advance

    PS. so my use function for this extension will be to spot lossy/lossless files.
    That utility is pure low quality, why bother using at all?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-14 11:38:39
    After updating from v0.7.4.0-alpha-2 to v0.7.4.0 foobar crashes and is no longer executable.
    Had to use the "foo_vis_spectrum_analyzer.dll" from my last system backup to get foobar running again.
    (foobar2000 v2.2 preview 2024-03-08 and CUI)
    You can get all the previous versions of the component from the repository and from GitHub.

    Do you have information on what you we're doing? Maybe a preset you can share that I can examine?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-14 11:55:09
    I pulled the 0.7.4.0 release from the component repository until I can find out what's happening.

    Famous last words: I runs stable on my machine...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MaFred on 2024-03-14 12:01:50
    The crash came immediately after the restart following the update to 0.7.40. I have set up three instances. Attach the crash report and the settings.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-14 12:04:33
    The crash came immediately after the restart following the update to 0.7.40. I have set up three instances. Attach the crash report and the settings.
    Thx. I got a couple crash dumps from Peter.

    Do you use Columns UI, by any chance?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-14 12:21:18
    The crash came immediately after the restart following the update to 0.7.40. I have set up three instances. Attach the crash report and the settings.
    Thx. I got a couple crash dumps from Peter.

    Do you use Columns UI, by any chance?
    @MaFred ,

    Fixed. I'll release a hot fix ASAP. Your preset files were a big help.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-14 12:46:58
    v0.7.4.1, 2024-03-14

    * Fixed: CUI configurations with styles that use color source "User Interface" caused a hard crash.

    Before I release it to the components repository, I'd appreciate some feedback from 1 or 2 CUI users that the bug is indeed fixed.

    You can download it from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.4.1).

    If you're interested in the cause of the crash:

    This release is able to respond to changes to the user interface colors in CUI. I tested a lot of scenarios except the one where styles were using CUI interface colors at startup. The style requested a user interface color that was not known yet at that point during startup.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MaFred on 2024-03-14 12:58:22
    Thanks for the quick update - v0.7.4.1 with CUI works here!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: metal_termite on 2024-03-14 17:21:41
    @metal_termite,

    the next version will have a few extra styles that will make it more easier to emulate that effect.

    Thank you sir. Much appreciated.

    Also, thanks for improving performance when the component is in an inactive tab/minimized state. It matches the behavior of the stock visualizers in that regard. I've tested it by putting the component in three inactive tabs and it has no affect on performance (GPU usage) whatsoever. Freezing is no longer required, at least for me. Well done.

    My last feature request, if you think it's worthwhile, would be adding a "Presets" submenu item to the context menu for quick access to loading saved presets: Context menu > Presets > {list of presets}
    Title: Re: foo_vis_spectrum_analyzer
    Post by: JesalRo on 2024-03-15 00:03:58
    Hi, I am new to the forum and I apologize if this is not the right place for this message.
    Thanks pqyt for your work, I find it a very powerful and perfect component for our Foobar and it works great.
    In my old 32Bit version I used the Peakmeter Spectrum Visualisation component (foo_uie_vis_peakmeter_spectrum) to know the DB signal of the left and right channel (I attach photo). Which has no updates.
    I would like to ask you, if it would be possible in the future to implement this new component horizontally for 64Bit.
    Thank you very much.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: metal_termite on 2024-03-15 00:27:29
    Just updated to 0.7.4.1.

    I've never reported this, but it's been true for many version updates, including this one. When I update the component to a new version it often has what appears to be background color refresh issues, that is it looks like the background color inherits the color of the bar or bar peak color. I typically have to reset my entire setup and recreate it from scratch to get it to function properly after an update. I suspect this might have to do with me typically having background colors set to none, but I'm not sure that's relevant, just guessing.

    To reproduce (1) import my preset using component version 0.7.3.0 (2) update to component version 0.7.4.1

    Title: Re: foo_vis_spectrum_analyzer
    Post by: yeyo on 2024-03-15 03:10:17
    The configuration file saved when the color source is set to the user interface, after the configuration file is loaded, the colors don't load correctly and need to be rendered correctly after playing a new track or going full screen once
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-15 05:34:49
    Hi, I am new to the forum and I apologize if this is not the right place for this message.
    Thanks pqyt for your work, I find it a very powerful and perfect component for our Foobar and it works great.
    In my old 32Bit version I used the Peakmeter Spectrum Visualisation component (foo_uie_vis_peakmeter_spectrum) to know the DB signal of the left and right channel (I attach photo). Which has no updates.
    I would like to ask you, if it would be possible in the future to implement this new component horizontally for 64Bit.
    Thank you very much.
    I think I can reuse most of the code. I'll put it on the To Do list.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-15 05:37:42
    Just updated to 0.7.4.1.

    I've never reported this, but it's been true for many version updates, including this one. When I update the component to a new version it often has what appears to be background color refresh issues, that is it looks like the background color inherits the color of the bar or bar peak color. I typically have to reset my entire setup and recreate it from scratch to get it to function properly after an update. I suspect this might have to do with me typically having background colors set to none, but I'm not sure that's relevant, just guessing.

    To reproduce (1) import my preset using component version 0.7.3.0 (2) update to component version 0.7.4.1
    Color mode "None" for the background is a leftover from a failed experiment with a transparent background and should fallback to color mode "Solid". I left it in for consistency and for when I have time to try another technique.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-15 05:44:31
    The configuration file saved when the color source is set to the user interface, after the configuration file is loaded, the colors don't load correctly and need to be rendered correctly after playing a new track or going full screen once
    Can you provide the steps you take when you have this issue? I tried a couple of things based on your description but I am not able to reproduce it.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: yeyo on 2024-03-15 09:12:28
    The configuration file saved when the color source is set to the user interface, after the configuration file is loaded, the colors don't load correctly and need to be rendered correctly after playing a new track or going full screen once
    Can you provide the steps you take when you have this issue? I tried a couple of things based on your description but I am not able to reproduce it.
    I made a gif, you can take a look at it. After loading, the correct color of the user interface is not displayed.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-15 12:19:32
    The configuration file saved when the color source is set to the user interface, after the configuration file is loaded, the colors don't load correctly and need to be rendered correctly after playing a new track or going full screen once
    Can you provide the steps you take when you have this issue? I tried a couple of things based on your description but I am not able to reproduce it.
    I made a gif, you can take a look at it. After loading, the correct color of the user interface is not displayed.
    @yeyo, Thx. I'll look into it.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: JesalRo on 2024-03-15 15:35:21
    Hi, I am new to the forum and I apologize if this is not the right place for this message.
    Thanks pqyt for your work, I find it a very powerful and perfect component for our Foobar and it works great.
    In my old 32Bit version I used the Peakmeter Spectrum Visualisation component (foo_uie_vis_peakmeter_spectrum) to know the DB signal of the left and right channel (I attach photo). Which has no updates.
    I would like to ask you, if it would be possible in the future to implement this new component horizontally for 64Bit.
    Thank you very much.
    I think I can reuse most of the code. I'll put it on the To Do list.

    Thank you very much for showing interest in the requested component. I am sure that many users will like it.
    I look forward to hearing from you when it is your turn on your list. I hope you have time to do it and give me a big surprise.
     :)  ;)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-03-15 21:58:48
    For me with the last couple versions (v0.7.4.0 and v0.7.4.1) the artwork will randomly turn off (appear blank) when I play a track, even though Show artwork on background is checked. It doesn't behave like this with v0.7.3.0.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-03-16 03:22:00
    For me with the last couple versions (v0.7.4.0 and v0.7.4.1) the artwork will randomly turn off (appear blank) when I play a track, even though Show artwork on background is checked. It doesn't behave like this with v0.7.3.0.

    Video... (Just copy and paste)

    youtu.be/9IwTvMeumL8

    Title: Re: foo_vis_spectrum_analyzer
    Post by: yeyo on 2024-03-16 09:48:12
    @pqyt
    When the Left of the Y-axis is not checked, the left of the X-axis Bans and Decibel is not fully displayed.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-16 09:49:51
    Work in progress: Scrolling spectogram with the SoX color scheme

    (https://raw.githubusercontent.com/stuerp/foo_vis_spectrum_analyzer/vNext/Resources/Preview.png)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: mycroft on 2024-03-16 12:40:08
    Useless, extremely low resolution spectrogram.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-16 13:26:51
    Useless, extremely low resolution spectrogram.
    Ahh, love it. @mycroft  being the consistent grumpy old f*rt. There are still things we can count on.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: bsdinis on 2024-03-17 19:08:10
    dude... this component gets 1658741 new bugs every time you update it.
    0.7.4.1X
    Title: Re: foo_vis_spectrum_analyzer
    Post by: bsdinis on 2024-03-17 19:17:56
    X
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-17 19:36:14
    dude... this component gets 1658741 new bugs every time you update it.
    0.7.4.1[attach type=image]29727[/attach]
    @bsdinis, dude... so don't use it!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-03-18 22:12:02
    Thanks for your latest update. This thing has made a lot of head-way in a short period of time. However, I'm still getting the disappearing artwork issue.

    www.youtube.com/watch?v=hNOVmdDHDb4
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-19 10:08:52
    Thanks for your latest update. This thing has made a lot of head-way in a short period of time. However, I'm still getting the disappearing artwork issue.

    www.youtube.com/watch?v=hNOVmdDHDb4
    The origin of all these problems is the different behavior of CUI.  Not a blame as such but it is very difficult and time-consuming to test multiple configurations. I use DUI only. F.e. the nagging lock-up problem only occurs with CUI (but has been fixed finally).

    Rant aside, I'll try to fix it. I underestimated the popularity of CUI.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-03-19 12:24:29
    Thanks for your latest update. This thing has made a lot of head-way in a short period of time. However, I'm still getting the disappearing artwork issue.

    www.youtube.com/watch?v=hNOVmdDHDb4
    The origin of all these problems is the different behavior of CUI.  Not a blame as such but it is very difficult and time-consuming to test multiple configurations. I use DUI only. F.e. the nagging lock-up problem only occurs with CUI (but has been fixed finally).

    Rant aside, I'll try to fix it. I underestimated the popularity of CUI.

    I guess you did.

    Now things are getting stable I hope you did not forget about transparency.
    To refresh your memory, I was able to issue screen refreshes that repainted my background art behind your plugin (0.7.0.0-beta-4) on screen resizes.

    Current issues you are having with art disappearing seem to be quite similar to what I encountered in the old version and was able to "fix" by putting a $showpanel_c(PQRT,0) the line above $showpanel_c(PQRT,1) where the panel is actually displayed.

    Only things that did not work was coming back from your plugin in full screenmode (which I won't use) and restoring from being minimized. In case that is not solved yet I most probably have a workaround for that now since Marc3k made some general tags that allow me to detect that fooBar is coming back from being minimized.

    So, I'd like to have a new go if you're up to it?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-19 13:02:08
    Thanks for your latest update. This thing has made a lot of head-way in a short period of time. However, I'm still getting the disappearing artwork issue.

    www.youtube.com/watch?v=hNOVmdDHDb4
    The origin of all these problems is the different behavior of CUI.  Not a blame as such but it is very difficult and time-consuming to test multiple configurations. I use DUI only. F.e. the nagging lock-up problem only occurs with CUI (but has been fixed finally).

    Rant aside, I'll try to fix it. I underestimated the popularity of CUI.
    So, I'd like to have a new go if you're up to it?
    If it's all the same to you, not for the upcoming release. Adding the spectogram required additional internal rewiring, e.g. a scrolling X-axis. Reducing the release tempo and focusing more on stability and polishing should be a priority, imho.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-03-19 13:40:40
    Thanks for your latest update. This thing has made a lot of head-way in a short period of time. However, I'm still getting the disappearing artwork issue.

    www.youtube.com/watch?v=hNOVmdDHDb4
    The origin of all these problems is the different behavior of CUI.  Not a blame as such but it is very difficult and time-consuming to test multiple configurations. I use DUI only. F.e. the nagging lock-up problem only occurs with CUI (but has been fixed finally).

    Rant aside, I'll try to fix it. I underestimated the popularity of CUI.
    So, I'd like to have a new go if you're up to it?
    If it's all the same to you, not for the upcoming release. Adding the spectogram required additional internal rewiring, e.g. a scrolling X-axis. Reducing the release tempo and focusing more on stability and polishing should be a priority, imho.

    I understand.

    I'll install current version to see if I can "fix" the disappearing art thingy, which most probably will also be an issue in my skin as well.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: mycroft on 2024-03-19 15:13:10
    Useless, extremely low resolution spectrogram.
    Ahh, love it. @mycroft  being the consistent grumpy old f*rt. There are still things we can count on.

    Look self in the mirror, resolution is so low that is completely waste of time.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-03-20 01:39:55
    Thanks for your latest update. This thing has made a lot of head-way in a short period of time. However, I'm still getting the disappearing artwork issue.

    www.youtube.com/watch?v=hNOVmdDHDb4
    The origin of all these problems is the different behavior of CUI.  Not a blame as such but it is very difficult and time-consuming to test multiple configurations. I use DUI only. F.e. the nagging lock-up problem only occurs with CUI (but has been fixed finally).

    Rant aside, I'll try to fix it. I underestimated the popularity of CUI.

    You could try another approach and put a transparency option. Then the existing artwork can coexist with the spectrum.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: always.beta on 2024-03-20 05:26:31
     How do I set spectrogram visualization to static?  Like spek.  I only found scrolling.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-20 05:28:55
    How do I set spectrogram visualization to static?  Like spek.  I only found scrolling.
    It's not implemented yet in alpha1.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-20 05:29:16
    Thanks for your latest update. This thing has made a lot of head-way in a short period of time. However, I'm still getting the disappearing artwork issue.

    www.youtube.com/watch?v=hNOVmdDHDb4
    The origin of all these problems is the different behavior of CUI.  Not a blame as such but it is very difficult and time-consuming to test multiple configurations. I use DUI only. F.e. the nagging lock-up problem only occurs with CUI (but has been fixed finally).

    Rant aside, I'll try to fix it. I underestimated the popularity of CUI.

    You could try another approach and put a transparency option. Then the existing artwork can coexist with the spectrum.
    Transparency is not as simple as "not drawing something" in times of compositing graphics.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-23 19:07:51
    Thanks for your latest update. This thing has made a lot of head-way in a short period of time. However, I'm still getting the disappearing artwork issue.

    www.youtube.com/watch?v=hNOVmdDHDb4
    @Majestyk

    which playlist component do you use? I am unable to reproduce this in DUI and CUI. Neither by double-clicking on a playlist item nor by advancing with the Next Track or Previous Track button.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-03-23 19:37:01
    Thanks for your latest update. This thing has made a lot of head-way in a short period of time. However, I'm still getting the disappearing artwork issue.

    www.youtube.com/watch?v=hNOVmdDHDb4
    @Majestyk

    which playlist component do you use? I am unable to reproduce this in DUI and CUI. Neither by double-clicking on a playlist item nor by advancing with the Next Track or Previous Track button.


    For what it is worth. In my skin based on the original DarkOne skin I've been running 5 simultaneous instances of your plugin, with a VU Meter, 2x WaveSeekbar and 3x WaveMini and a two different Peakmeter Spectrum instances. Been running it for days on end, no glitches, no disappearing art.

    I am using good old ELP as a playlistmanager though.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-03-24 00:21:22
    Thanks for your latest update. This thing has made a lot of head-way in a short period of time. However, I'm still getting the disappearing artwork issue.

    www.youtube.com/watch?v=hNOVmdDHDb4
    @Majestyk

    which playlist component do you use? I am unable to reproduce this in DUI and CUI. Neither by double-clicking on a playlist item nor by advancing with the Next Track or Previous Track button.


    It happens with any playlist. Foobar's default playlist, ELP, JSPLaylist, etc. versions 0.7.3.0 and prior did not do this. Now I have found, with the last two versions, not only does the artwork disappear but when it does appear it can be off centered.

    I just tried it on EOLE theme and it does the same thing.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-03-24 03:22:27
    I just tried it on another PC which has both Windows 10 and 11 and it has the same glitch.

    Anyway, if I'm the only one who has the issue then I suggest forgetting it. :)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-03-24 04:00:34
    I just tried it on another PC which has both Windows 10 and 11 and it has the same glitch.

    Anyway, if I'm the only one who has the issue then I suggest forgetting it. :)

    I was finally able to create a situation in my skin as well where art disappears (from all 5 instances) at the same time. This happens when you restart the same playing track. The moment a different track is played all art reappears.
    Probably not related to your situation.


    Title: Re: foo_vis_spectrum_analyzer
    Post by: yeyo on 2024-03-25 04:38:17
    It's not implemented yet in alpha1.
    @pqyt
    When the Left of the Y-axis is not checked, the left of the X-axis Bans and Decibel is not fully displayed
    It's not implemented yet in alpha1.

    Dark color is not supported in the lower-right corner of the settings window
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-03-25 08:08:31
    I just tried it on another PC which has both Windows 10 and 11 and it has the same glitch.

    Anyway, if I'm the only one who has the issue then I suggest forgetting it. :)

    I was finally able to create a situation in my skin as well where art disappears (from all 5 instances) at the same time. This happens when you restart the same playing track. The moment a different track is played all art reappears.
    Probably not related to your situation.





    It happens to me almost every day. I use DUI and use this component as a pop-up. When I start it there usually is no art in the backgroud and the Nyquist line is at the 22,05kHz no matter what file I play (no matter if it is 44,1, 48, 88,2, 96, 176,4 or 192 or DSD). If I wait with the component enabled till the next song, the art usually appears and the Nyquist line goes to proper position. But if I then close the component and then start it again or resize it....the things usually (not always) go to the starting point (no art and wrong Nyquist position).

    Plus there happen random foobar crashes when the component is popped-up - more often with DSD but I already had few with PCM. Every time this happens I send the crashreport to foobar. It happens rather rarely but happens.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-25 15:17:11
    I just tried it on another PC which has both Windows 10 and 11 and it has the same glitch.

    Anyway, if I'm the only one who has the issue then I suggest forgetting it. :)

    I was finally able to create a situation in my skin as well where art disappears (from all 5 instances) at the same time. This happens when you restart the same playing track. The moment a different track is played all art reappears.
    Probably not related to your situation.





    It happens to me almost every day. I use DUI and use this component as a pop-up. When I start it there usually is no art in the backgroud and the Nyquist line is at the 22,05kHz no matter what file I play (no matter if it is 44,1, 48, 88,2, 96, 176,4 or 192 or DSD). If I wait with the component enabled till the next song, the art usually appears and the Nyquist line goes to proper position. But if I then close the component and then start it again or resize it....the things usually (not always) go to the starting point (no art and wrong Nyquist position).

    Plus there happen random foobar crashes when the component is popped-up - more often with DSD but I already had few with PCM. Every time this happens I send the crashreport to foobar. It happens rather rarely but happens.
    As I have previously explained (except for the crash) the behavior is as-designed but not as-expected-by-the-end-user. A redesign is on my To Do list.

    In the lastest alpha version (on GitHub) all known crash causes have been fixed but some may remain.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-27 08:57:51
    v0.7.5.0-beta1, 2024-03-27

    * New: Spectogram visualization.
      * Static or scrolling
    * New: Built-in SoX color scheme and corresponding non-linear amplitude color map suited for the spectogram visualization.
    * New: The context menu can be used to load a preset.
    * New: Artwork Fit mode. Defaults to "Fit Big".
    * Improved: Double-clicking a preset activates it.
    * Fixed: Privacy issue: The preset path will no longer be saved to a preset file.
    * Fixed: The spin buttons were not updated when switching between multiple graphs in the configuration dialog.
    * Fixed: Inconsistent state of the color buttons and values when switching between styles in the configuration dialog.
    * Fixed: User interface colors were not activated after loading a preset.
    * Fixed: The custom Solid color was not always saved correctly.
    * Fixed: Deadlock condition specific to CUI when playback was set to resume at startup.
    * Fixed: Memory leak in tool tips when resizing the component.
    * Fixed: Artwork should now consistently be rendered when requested.

    While in beta testing you can only download it from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.5.0-beta1).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MG240 on 2024-03-27 17:34:41
    Thanks a lot for the new update.

    [v0.7.5.0-beta1, 2024-03-27]
    Regression: a white flash appears when toggling full-screen mode.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-27 17:43:14
    Thanks a lot for the new update.

    [v0.7.5.0-beta1, 2024-03-27]
    Regression: a white flash appears when toggling full-screen mode.
    Huh? Nothing was changed to that part of the code. DUI or CUI?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MG240 on 2024-03-27 19:07:46
    Thanks a lot for the new update.

    [v0.7.5.0-beta1, 2024-03-27]
    Regression: a white flash appears when toggling full-screen mode.
    Huh? Nothing was changed to that part of the code. DUI or CUI?

    DUI - foobar2000-x64_v2.2_preview_2024-03-21 - Windows 11 22H2.

    This doesn't happen with v0.7.5.0-alpha2. I've attached a video of the issue.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-03-28 07:38:56
    Work in progress: Scrolling spectogram with the SoX color scheme

    (https://raw.githubusercontent.com/stuerp/foo_vis_spectrum_analyzer/vNext/Resources/Preview.png)
    I noticed the "regression" on how low frequencies look (what I meant is the sinc-interpolation on bass frequencies (assuming log frequency scale) is now improper unlike this (https://codepen.io/TF3RDL/pen/poQJwRW), which is proper and matches zero-padded FFTs) becomes obvious with spectrogram display as "artifacts" on lower frequencies that doesn't appear in fb2k's built-in spectrogram even with the same window function (Gaussian window with parameter of 2.4)

    BTW, this makes me want a spectrogram (and combined spectrum/spectrogram) mode for @Crossover's foo_enhanced_spectrum_analyzer more :D
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-28 11:07:53
    I noticed the "regression" on how low frequencies look (what I meant is the sinc-interpolation on bass frequencies (assuming log frequency scale) is now improper unlike this (https://codepen.io/TF3RDL/pen/poQJwRW), which is proper and matches zero-padded FFTs) becomes obvious with spectrogram display as "artifacts" on lower frequencies that doesn't appear in fb2k's built-in spectrogram even with the same window function (Gaussian window with parameter of 2.4)
    Spectogram uses exactly the same code as the bars and curve visualization. Between the preview and now nothing has changed. Just polishing and optimization. Please provide more details about what you think is wrong.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-03-28 23:11:39
    I'm having a scaling issue, which has probably been around since the beginning but I'm just noticing it now. It looks fine at some screen resolutions but there can be a big margin on the right on others.

    Video link...

    www.youtube.com/watch?v=vBV9FMuBSOI
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-03-28 23:43:09
    By the way, just to add to the above... I know it can be adjusted manually but it would be nice if it can "auto scale" so when people download my Darkone tweak theme, they don't have to do that.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-29 06:07:58
    By the way, just to add to the above... I know it can be adjusted manually but it would be nice if it can "auto scale" so when people download my Darkone tweak theme, they don't have to do that.
    It's not a scaling issue.

    Either I use 'fractional' pixels and then people complain that the spacing between the bars is uneven; or I use 'full' pixels and you get a trailing space because the total width of (bar count x bar width) is less than the available width of the component. Damned if I do and damned if I don't.

    The only option left is to stick with 'full' pixels and to divide the unused space left and right of the bars. And I'm sure someone will complain about that too.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: mihelson on 2024-03-29 18:27:46
    Can you expect a background setting like the picture on the right? It looks more beautiful (very old plugin foo_uie_vis_peakmeter_spectrum.dll).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: hormidor on 2024-03-29 20:14:59
    Thank you for this component, it fits my setup perfectly and the level of customisation is incredible.
    I wanted to point some things out about the artwork colour feature; I think there are a couple simple issues with it that could be improved with great results.

    1) The calculator comes up with colors that don't actually exist in the artwork.

    2) The calculator selects 9 colors every time, even though, per changelog, "between 2 and 256 colors can be selected".

    I would suggest adding a stepped number selector to the UI ranging from 2 to 256 so one can tweak this value.

    3) The colours are totally out of order in terms of brightness (which ruins the idea of an amplitude-based gradient).

    4) additionally (not pictured), the artwork colours often fail to load (or have a long delay in loading), defaulting to black and white.

    On this last point, as has been suggested before, it would be great to have control over those defaults; i.e in the config, under 'Styles', in the list beginning with 'Graph Background', add the options 'Fallback Gradient' and 'Fallback Dominant' or something of the sort where one might pick what colours should be used in case of no album art.

    To illustrate what I mean with the points above, where the left side is the current behaviour of the artwork colour picker - I should ideally be able to restrict the number of colours to e.g 3 and get something like on the right side, correctly ordered by luminosity.
     (https://i.imgur.com/X6AJ023.png)

    Thank you very much for your continued work on the project.


    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-29 22:23:05
    1) The calculator comes up with colors that don't actually exist in the artwork.
    That's a result of the algorithm. To determine the colors in an acceptable amount of time similar colors are put in 'boxes'. Each box can only have one leading color.
    2) The calculator selects 9 colors every time, even though, per changelog, "between 2 and 256 colors can be selected".
    3) The colours are totally out of order in terms of brightness (which ruins the idea of an amplitude-based gradient).
    What do think the settings in the Common / Artwork section are for?

    Title: Re: foo_vis_spectrum_analyzer
    Post by: hormidor on 2024-03-30 01:41:20
    1) The calculator comes up with colors that don't actually exist in the artwork.
    That's a result of the algorithm. To determine the colors in an acceptable amount of time similar colors are put in 'boxes'. Each box can only have one leading color.
    2) The calculator selects 9 colors every time, even though, per changelog, "between 2 and 256 colors can be selected".
    3) The colours are totally out of order in terms of brightness (which ruins the idea of an amplitude-based gradient).
    What do think the settings in the Common / Artwork section are for?

    Thanks, I was not aware the settings were in a different section.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: chiglit on 2024-03-31 09:19:02
    I know this isn't strictly related to the component, but do you have any idea why I can't get it to run past ~64fps?

    Love the component. Thanks for your effort!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Cosh on 2024-03-31 11:32:53
    Can you expect a background setting like the picture on the right? It looks more beautiful (very old plugin foo_uie_vis_peakmeter_spectrum.dll).
    (https://i.postimg.cc/xTsKN9MM/screen.png)
    5/5 really like this idea 👍
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-31 14:14:42
    I know this isn't strictly related to the component, but do you have any idea why I can't get it to run past ~64fps?
    The component uses a high-resolution timer which has no restrictions but I *assume* it is caused by the Direct3D swap chain being tied to the monitor refresh rate (60Hz). Anyone with a variable or higher refresh rate monitor that can confirm this?
    Love the component. Thanks for your effort!
    Thx
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-31 14:55:41
    Sneak preview: Peak Meter (Peak and RMS)

    (https://raw.githubusercontent.com/stuerp/foo_vis_spectrum_analyzer/vNext/Resources/Preview.png)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-03-31 17:25:59
    I know this isn't strictly related to the component, but do you have any idea why I can't get it to run past ~64fps?
    The component uses a high-resolution timer which has no restrictions but I *assume* it is caused by the Direct3D swap chain being tied to the monitor refresh rate (60Hz). Anyone with a variable or higher refresh rate monitor that can confirm this?
    I have 144 Hz monitor. Update rate seems to max out here at 100 fps. The frame counter goes crazy and shows anything between 99.xx and 100.xx.
    By the way, the built-in frame display has too little space when the fps goes above 100. The "fps" string jumps to a new line.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-31 17:31:23
    I know this isn't strictly related to the component, but do you have any idea why I can't get it to run past ~64fps?
    The component uses a high-resolution timer which has no restrictions but I *assume* it is caused by the Direct3D swap chain being tied to the monitor refresh rate (60Hz). Anyone with a variable or higher refresh rate monitor that can confirm this?
    I have 144 Hz monitor. Update rate seems to max out here at 100 fps. The frame counter goes crazy and shows anything between 99.xx and 100.xx.
    By the way, the built-in frame display has too little space when the fps goes above 100. The "fps" string jumps to a new line.
    Thx. for the confirmation and the bug report.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: chiglit on 2024-03-31 19:22:07
    The component uses a high-resolution timer which has no restrictions but I *assume* it is caused by the Direct3D swap chain being tied to the monitor refresh rate (60Hz). Anyone with a variable or higher refresh rate monitor that can confirm this?

    I'm on a 144hz VRR monitor (Gsync) with a high-end GPU. Using 32-bit Foobar with the latest drivers, DX, etc. The FPS counter keeps oscillating between 60 and 64 fps for every refresh rate limit >= 60HZ.

    Thanks for looking into it.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-03-31 23:25:15
    v0.7.5.0-beta2, 2024-03-31

    * New: Peak Meter visualization.
    * Improved: Edge cases for the scaling and position of the spectrum bars and curve vs. the X-axis.

    While in beta testing you can only download it from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.5.0-beta2).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: yeyo on 2024-04-01 03:50:38
    v0.7.5.0-beta2, 2024-03-31

    * New: Peak Meter visualization.
    * Improved: Edge cases for the scaling and position of the spectrum bars and curve vs. the X-axis.

    While in beta testing you can only download it from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.5.0-beta2).

    There is a problem with the gap between the two sides of the Y-axis when resizing the visualization panel, check out the video below:
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-01 07:16:50
    v0.7.5.0-beta2, 2024-03-31

    * New: Peak Meter visualization.
    * Improved: Edge cases for the scaling and position of the spectrum bars and curve vs. the X-axis.

    While in beta testing you can only download it from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.5.0-beta2).
    There is a problem with the gap between the two sides of the Y-axis when resizing the visualization panel, check out the video below:
    That's how it's supposed to react: The width of a bar adapts to the available space as an whole number; no more fractional bar widths and rounding errors.

    When the available space becomes width enough through resizing or through disabling the Y-axis for a wider bar the graph re-calculates and occupies the available space.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-02 17:53:08
    @pqyt,

    Quote:
    1. All of the above has been fixed or stabilized a couple of releases ago,
    2. This is way off-topic. This thread is for foo_uie_peakmeter_spectrum.
    End quote.

    Moving to proper topic,
    I used your newest beta2 and all those 3 bugs are still present. I checked on two different laptops with two versions of foobar (32bit and 64bit).

    - Nyquist line still in wrong position
    - art still appearing/disappearing
    - right end of the spectrum/peak meter disapearing and never coming back.

    I really double checked the issue and it is there.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-02 18:15:04
    @pqyt,

    Quote:
    1. All of the above has been fixed or stabilized a couple of releases ago,
    2. This is way off-topic. This thread is for foo_uie_peakmeter_spectrum.
    End quote.

    Moving to proper topic,
    I used your newest beta2 and all those 3 bugs are still present. I checked on two different laptops with two versions of foobar (32bit and 64bit).

    - Nyquist line still in wrong position
    - art still appearing/disappearing
    - right end of the spectrum/peak meter disapearing and never coming back.
    I really double checked the issue and it is there.
    @wojak , can you send me a preset file? Which sample rate is the track that causes a problem? I really can not reproduce this.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-02 19:44:39
    @pqyt,

    Quote:
    1. All of the above has been fixed or stabilized a couple of releases ago,
    2. This is way off-topic. This thread is for foo_uie_peakmeter_spectrum.
    End quote.

    Moving to proper topic,
    I used your newest beta2 and all those 3 bugs are still present. I checked on two different laptops with two versions of foobar (32bit and 64bit).

    - Nyquist line still in wrong position
    - art still appearing/disappearing
    - right end of the spectrum/peak meter disapearing and never coming back.
    I really double checked the issue and it is there.
    @wojak , can you send me a preset file? Which sample rate is the track that causes a problem? I really can not reproduce this.

    Right now I reverted to last stable version. I can send a preset file if you tell me how to do such thing on this forum. Do I need to use external "cloud" (please name any - I do not do such things so I have little knowledge) and copy the link or smth else? Do you prefer the file from last stable or the latest beta?
    The sample rate does not matter, the Nyquist line is always at 22,05 if I enable the popup while playing the file (no matter if 44,1, 48, 82,2, 96, 176,6, 192 or DSD). It jumps to proper position only if I start to play next (or the same song) from the begining when the popup window is already active.
    The cover art problem seems random (you already explained that it is not random but it just looks random to the common user like me - I just do not see any pattern).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-02 19:56:29
    Right now I reverted to last stable version. I can send a preset file if you tell me how to do such thing on this forum. Do I need to use external "cloud" (please name any - I do not do such things so I have little knowledge) and copy the link or smth else? Do you prefer the file from last stable or the latest beta?
    The sample rate does not matter, the Nyquist line is always at 22,05 if I enable the popup while playing the file (no matter if 44,1, 48, 82,2, 96, 176,6, 192 or DSD). It jumps to proper position only if I start to play next (or the same song) from the begining when the popup window is already active.
    The cover art problem seems random (you already explained that it is not random but it just looks random to the common user like me - I just do not see any pattern).
    Preferably from beta2. You can attach it to a reply here. It does not contain any personal data.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-02 20:34:58
    Right now I reverted to last stable version. I can send a preset file if you tell me how to do such thing on this forum. Do I need to use external "cloud" (please name any - I do not do such things so I have little knowledge) and copy the link or smth else? Do you prefer the file from last stable or the latest beta?
    The sample rate does not matter, the Nyquist line is always at 22,05 if I enable the popup while playing the file (no matter if 44,1, 48, 82,2, 96, 176,6, 192 or DSD). It jumps to proper position only if I start to play next (or the same song) from the begining when the popup window is already active.
    The cover art problem seems random (you already explained that it is not random but it just looks random to the common user like me - I just do not see any pattern).
    Preferably from beta2. You can attach it to a reply here. It does not contain any personal data.

    I still do not know how to attach a file here. I do not see any option to do that yet people do it and even their images are directly visible in the posts. How to do all of this?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-02 21:01:35
    Right now I reverted to last stable version. I can send a preset file if you tell me how to do such thing on this forum. Do I need to use external "cloud" (please name any - I do not do such things so I have little knowledge) and copy the link or smth else? Do you prefer the file from last stable or the latest beta?
    The sample rate does not matter, the Nyquist line is always at 22,05 if I enable the popup while playing the file (no matter if 44,1, 48, 82,2, 96, 176,6, 192 or DSD). It jumps to proper position only if I start to play next (or the same song) from the begining when the popup window is already active.
    The cover art problem seems random (you already explained that it is not random but it just looks random to the common user like me - I just do not see any pattern).
    Preferably from beta2. You can attach it to a reply here. It does not contain any personal data.

    You will find the link to my preset from beta2.
    https://we.tl/t-5ibmkGscka

    I checked once more and it was like that:
    I start a 96/24 file, then bring the component window up. The preferences are set to display from 1Hz to 96kHz and with an art. But what I see if just the left side of the spectrum up to 1,8kHz with art on the right. With no Nyquist line. Then I make it fullscreen, nothing changes. Then I make it normal, nothing changes. Then I click on the file in the palylist to play it from the begining and the spectrum changes to proper (to 96kHz) with proper Nyquist line but the cover art disapears.
    It seems that the behaviour is somewhat different each time but always wrong. I did not change in my Windows nor Foobar nor your component.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-04-03 06:29:38
    I still do not know how to attach a file here. I do not see any option to do that yet people do it and even their images are directly visible in the posts. How to do all of this?

    When you are composing a post, directly below the composition window is a bar saying "Add files by dragging & dropping or selecting them."  Clicking "selecting them" will open the usual browse dialog allowing you to pick a file from your PC.

    Image files added this way will show up as small images in the post that if clicked on will open to full size.  You can also use an image upload site like Imgur to upload an image, then create a "link to image file" from your browser's context menu and copy it to the "Insert an Image" button at the top of the message pane, which will make the full image appear in the post where you want it.  That can be checked using the "Preview" button before posting, however images attached via the Forum method will not be viewable from Preview.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-03 07:21:26
    Right now I reverted to last stable version. I can send a preset file if you tell me how to do such thing on this forum. Do I need to use external "cloud" (please name any - I do not do such things so I have little knowledge) and copy the link or smth else? Do you prefer the file from last stable or the latest beta?
    The sample rate does not matter, the Nyquist line is always at 22,05 if I enable the popup while playing the file (no matter if 44,1, 48, 82,2, 96, 176,6, 192 or DSD). It jumps to proper position only if I start to play next (or the same song) from the begining when the popup window is already active.
    The cover art problem seems random (you already explained that it is not random but it just looks random to the common user like me - I just do not see any pattern).
    Preferably from beta2. You can attach it to a reply here. It does not contain any personal data.

    You will find the link to my preset from beta2.
    https://we.tl/t-5ibmkGscka

    I checked once more and it was like that:
    I start a 96/24 file, then bring the component window up. The preferences are set to display from 1Hz to 96kHz and with an art. But what I see if just the left side of the spectrum up to 1,8kHz with art on the right. With no Nyquist line. Then I make it fullscreen, nothing changes. Then I make it normal, nothing changes. Then I click on the file in the palylist to play it from the begining and the spectrum changes to proper (to 96kHz) with proper Nyquist line but the cover art disapears.
    It seems that the behaviour is somewhat different each time but always wrong. I did not change in my Windows nor Foobar nor your component.
    This is as close as I can get based on your description. Works as expected, AFAIK.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-03 08:17:16
    Right now I reverted to last stable version. I can send a preset file if you tell me how to do such thing on this forum. Do I need to use external "cloud" (please name any - I do not do such things so I have little knowledge) and copy the link or smth else? Do you prefer the file from last stable or the latest beta?
    The sample rate does not matter, the Nyquist line is always at 22,05 if I enable the popup while playing the file (no matter if 44,1, 48, 82,2, 96, 176,6, 192 or DSD). It jumps to proper position only if I start to play next (or the same song) from the begining when the popup window is already active.
    The cover art problem seems random (you already explained that it is not random but it just looks random to the common user like me - I just do not see any pattern).
    Preferably from beta2. You can attach it to a reply here. It does not contain any personal data.

    You will find the link to my preset from beta2.
    https://we.tl/t-5ibmkGscka

    I checked once more and it was like that:
    I start a 96/24 file, then bring the component window up. The preferences are set to display from 1Hz to 96kHz and with an art. But what I see if just the left side of the spectrum up to 1,8kHz with art on the right. With no Nyquist line. Then I make it fullscreen, nothing changes. Then I make it normal, nothing changes. Then I click on the file in the palylist to play it from the begining and the spectrum changes to proper (to 96kHz) with proper Nyquist line but the cover art disapears.
    It seems that the behaviour is somewhat different each time but always wrong. I did not change in my Windows nor Foobar nor your component.
    This is as close as I can get based on your description. Works as expected, AFAIK.

    I will try to post a clip of my case later but maybe there is a problem with scalling? Remember when you introduced the plugin, there was a problem that when you expanded the settings with new options it seized to fit on my screen? I use 125% because I have to (and I will not change it because I just can't).
    Nevertheles in my case it does not look/work as in your video attached above.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-03 16:27:07
    Right now I reverted to last stable version. I can send a preset file if you tell me how to do such thing on this forum. Do I need to use external "cloud" (please name any - I do not do such things so I have little knowledge) and copy the link or smth else? Do you prefer the file from last stable or the latest beta?
    The sample rate does not matter, the Nyquist line is always at 22,05 if I enable the popup while playing the file (no matter if 44,1, 48, 82,2, 96, 176,6, 192 or DSD). It jumps to proper position only if I start to play next (or the same song) from the begining when the popup window is already active.
    The cover art problem seems random (you already explained that it is not random but it just looks random to the common user like me - I just do not see any pattern).
    Preferably from beta2. You can attach it to a reply here. It does not contain any personal data.

    You will find the link to my preset from beta2.
    https://we.tl/t-5ibmkGscka

    I checked once more and it was like that:
    I start a 96/24 file, then bring the component window up. The preferences are set to display from 1Hz to 96kHz and with an art. But what I see if just the left side of the spectrum up to 1,8kHz with art on the right. With no Nyquist line. Then I make it fullscreen, nothing changes. Then I make it normal, nothing changes. Then I click on the file in the palylist to play it from the begining and the spectrum changes to proper (to 96kHz) with proper Nyquist line but the cover art disapears.
    It seems that the behaviour is somewhat different each time but always wrong. I did not change in my Windows nor Foobar nor your component.
    This is as close as I can get based on your description. Works as expected, AFAIK.

    I will try to post a clip of my case later but maybe there is a problem with scalling? Remember when you introduced the plugin, there was a problem that when you expanded the settings with new options it seized to fit on my screen? I use 125% because I have to (and I will not change it because I just can't).
    Nevertheles in my case it does not look/work as in your video attached above.


    I am sorry but I am unable to record what is going on my monitor. I start foobar and use win+alt+g and start recording. But when I bring up the popup with your componet or anything else it is not on the recording - only the main foobars window is there.
    How am I supposed to record all other "layers" of what is on the screen?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-03 17:47:41
    Right now I reverted to last stable version. I can send a preset file if you tell me how to do such thing on this forum. Do I need to use external "cloud" (please name any - I do not do such things so I have little knowledge) and copy the link or smth else? Do you prefer the file from last stable or the latest beta?
    The sample rate does not matter, the Nyquist line is always at 22,05 if I enable the popup while playing the file (no matter if 44,1, 48, 82,2, 96, 176,6, 192 or DSD). It jumps to proper position only if I start to play next (or the same song) from the begining when the popup window is already active.
    The cover art problem seems random (you already explained that it is not random but it just looks random to the common user like me - I just do not see any pattern).
    Preferably from beta2. You can attach it to a reply here. It does not contain any personal data.

    You will find the link to my preset from beta2.
    https://we.tl/t-5ibmkGscka

    I checked once more and it was like that:
    I start a 96/24 file, then bring the component window up. The preferences are set to display from 1Hz to 96kHz and with an art. But what I see if just the left side of the spectrum up to 1,8kHz with art on the right. With no Nyquist line. Then I make it fullscreen, nothing changes. Then I make it normal, nothing changes. Then I click on the file in the palylist to play it from the begining and the spectrum changes to proper (to 96kHz) with proper Nyquist line but the cover art disapears.
    It seems that the behaviour is somewhat different each time but always wrong. I did not change in my Windows nor Foobar nor your component.
    This is as close as I can get based on your description. Works as expected, AFAIK.

    OK, VLC did the trick.
    In the attached video you will see that I play 96/24 file then bring up the popup with your componet and it ends at 2kHz with cover art to the right (which probably is center but the right side is cut out). There is also no Nyquist line. Then I restart the track and the component windows becomes OK, with full scale (to 96kHz) and proper Nyquist line but the art disappeared. Then I change it to Peak Meter which is OK up to the moment when I make it full screen. Once again the right part is cut out and never comes back until I restart the track.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-03 19:44:18
    Right now I reverted to last stable version. I can send a preset file if you tell me how to do such thing on this forum. Do I need to use external "cloud" (please name any - I do not do such things so I have little knowledge) and copy the link or smth else? Do you prefer the file from last stable or the latest beta?
    The sample rate does not matter, the Nyquist line is always at 22,05 if I enable the popup while playing the file (no matter if 44,1, 48, 82,2, 96, 176,6, 192 or DSD). It jumps to proper position only if I start to play next (or the same song) from the begining when the popup window is already active.
    The cover art problem seems random (you already explained that it is not random but it just looks random to the common user like me - I just do not see any pattern).
    Preferably from beta2. You can attach it to a reply here. It does not contain any personal data.

    You will find the link to my preset from beta2.
    https://we.tl/t-5ibmkGscka

    I checked once more and it was like that:
    I start a 96/24 file, then bring the component window up. The preferences are set to display from 1Hz to 96kHz and with an art. But what I see if just the left side of the spectrum up to 1,8kHz with art on the right. With no Nyquist line. Then I make it fullscreen, nothing changes. Then I make it normal, nothing changes. Then I click on the file in the palylist to play it from the begining and the spectrum changes to proper (to 96kHz) with proper Nyquist line but the cover art disapears.
    It seems that the behaviour is somewhat different each time but always wrong. I did not change in my Windows nor Foobar nor your component.
    This is as close as I can get based on your description. Works as expected, AFAIK.

    OK, VLC did the trick.
    In the attached video you will see that I play 96/24 file then bring up the popup with your componet and it ends at 2kHz with cover art to the right (which probably is center but the right side is cut out). There is also no Nyquist line. Then I restart the track and the component windows becomes OK, with full scale (to 96kHz) and proper Nyquist line but the art disappeared. Then I change it to Peak Meter which is OK up to the moment when I make it full screen. Once again the right part is cut out and never comes back until I restart the track.
    You were right. It had to do with the DPI setting. I don't know yet what changed for the DPI calculation to be ignored. But at least I know where to look.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-03 21:48:03
    Right now I reverted to last stable version. I can send a preset file if you tell me how to do such thing on this forum. Do I need to use external "cloud" (please name any - I do not do such things so I have little knowledge) and copy the link or smth else? Do you prefer the file from last stable or the latest beta?
    The sample rate does not matter, the Nyquist line is always at 22,05 if I enable the popup while playing the file (no matter if 44,1, 48, 82,2, 96, 176,6, 192 or DSD). It jumps to proper position only if I start to play next (or the same song) from the begining when the popup window is already active.
    The cover art problem seems random (you already explained that it is not random but it just looks random to the common user like me - I just do not see any pattern).
    Preferably from beta2. You can attach it to a reply here. It does not contain any personal data.

    You will find the link to my preset from beta2.
    https://we.tl/t-5ibmkGscka

    I checked once more and it was like that:
    I start a 96/24 file, then bring the component window up. The preferences are set to display from 1Hz to 96kHz and with an art. But what I see if just the left side of the spectrum up to 1,8kHz with art on the right. With no Nyquist line. Then I make it fullscreen, nothing changes. Then I make it normal, nothing changes. Then I click on the file in the palylist to play it from the begining and the spectrum changes to proper (to 96kHz) with proper Nyquist line but the cover art disapears.
    It seems that the behaviour is somewhat different each time but always wrong. I did not change in my Windows nor Foobar nor your component.
    This is as close as I can get based on your description. Works as expected, AFAIK.

    OK, VLC did the trick.
    In the attached video you will see that I play 96/24 file then bring up the popup with your componet and it ends at 2kHz with cover art to the right (which probably is center but the right side is cut out). There is also no Nyquist line. Then I restart the track and the component windows becomes OK, with full scale (to 96kHz) and proper Nyquist line but the art disappeared. Then I change it to Peak Meter which is OK up to the moment when I make it full screen. Once again the right part is cut out and never comes back until I restart the track.
    You were right. It had to do with the DPI setting. I don't know yet what changed for the DPI calculation to be ignored. But at least I know where to look.
    Fixed it. An unfortunate regression...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-04 17:26:14
    Right now I reverted to last stable version. I can send a preset file if you tell me how to do such thing on this forum. Do I need to use external "cloud" (please name any - I do not do such things so I have little knowledge) and copy the link or smth else? Do you prefer the file from last stable or the latest beta?
    The sample rate does not matter, the Nyquist line is always at 22,05 if I enable the popup while playing the file (no matter if 44,1, 48, 82,2, 96, 176,6, 192 or DSD). It jumps to proper position only if I start to play next (or the same song) from the begining when the popup window is already active.
    The cover art problem seems random (you already explained that it is not random but it just looks random to the common user like me - I just do not see any pattern).
    Preferably from beta2. You can attach it to a reply here. It does not contain any personal data.

    You will find the link to my preset from beta2.
    https://we.tl/t-5ibmkGscka

    I checked once more and it was like that:
    I start a 96/24 file, then bring the component window up. The preferences are set to display from 1Hz to 96kHz and with an art. But what I see if just the left side of the spectrum up to 1,8kHz with art on the right. With no Nyquist line. Then I make it fullscreen, nothing changes. Then I make it normal, nothing changes. Then I click on the file in the palylist to play it from the begining and the spectrum changes to proper (to 96kHz) with proper Nyquist line but the cover art disapears.
    It seems that the behaviour is somewhat different each time but always wrong. I did not change in my Windows nor Foobar nor your component.
    This is as close as I can get based on your description. Works as expected, AFAIK.

    OK, VLC did the trick.
    In the attached video you will see that I play 96/24 file then bring up the popup with your componet and it ends at 2kHz with cover art to the right (which probably is center but the right side is cut out). There is also no Nyquist line. Then I restart the track and the component windows becomes OK, with full scale (to 96kHz) and proper Nyquist line but the art disappeared. Then I change it to Peak Meter which is OK up to the moment when I make it full screen. Once again the right part is cut out and never comes back until I restart the track.
    You were right. It had to do with the DPI setting. I don't know yet what changed for the DPI calculation to be ignored. But at least I know where to look.
    Fixed it. An unfortunate regression...

    Will there be another beta to test the fixes?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-04 17:38:50
    v0.7.5.0, 2024-04-04

    * New: Spectogram visualization.
      * Static or scrolling
    * New: Peak Meter visualization.
    * New: Built-in SoX color scheme and corresponding non-linear amplitude color map suited for the spectogram visualization.
    * New: The context menu can be used to load a preset.
    * New: Artwork Fit mode. Defaults to "Fit Big".
    * Improved: Double-clicking a preset activates it.
    * Improved: Edge cases for the scaling and position of the spectrum bars and curve vs. the X-axis.
    * Improved: LED Mode is also applied to the bar background.
    * Improved: The LED size and gap can be configured.
    * Improved: The font of the X and Y-axis can be configured in all visualizations.
    * Fixed: Privacy issue: The preset path will no longer be saved to a preset file.
    * Fixed: The spin buttons were not updated when switching between multiple graphs in the configuration dialog.
    * Fixed: Inconsistent state of the color buttons and values when switching between styles in the configuration dialog.
    * Fixed: User interface colors were not activated after loading a preset.
    * Fixed: The custom Solid color was not always saved correctly.
    * Fixed: Deadlock condition specific to CUI when playback was set to resume at startup.
    * Fixed: Memory leak in tool tips when resizing the component.
    * Fixed: Artwork should now consistently be rendered when requested.

    You can download it from the Component repository (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) or from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.5.0).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-04 20:52:29
    Hi,

    thank you for the new version.

    I have tested it a bit and here are my observations:
    - Spectrum: when playing 96/24 files and then bringing the popup - the art is there from the begining but the Nyquist line is still in the wrong place (22,05). Changing to full-sreen and back changes nothing. That is good that the art does not disappear but the Nyquist is still wrong. But if I then click to restart the file - the Nyquist line goes to proper position but the art disappears. But then if I click to full screen the art appears but the Nyquist goes back to wrong position (22,05) and it stays there. Everything is fine now with 44,1 files though.
    - Peak meter: I use it in horizontal position. It works well even if I change to full-screen and back. One drawback (it only appears in horizontal option) is when I want to disable either top or bottom digits. They all disappear (meaning I can only see either both or none). It is the same with left/right digits - disabling left or right really disables both. It only happens in the peak meter mode and only when horizontal. Plus it would be nice to be able to set the top value larger than 0 here in order to see some blank space on the top end or to see the whole bar when peak is higher than 0. Just like in built-in meter (but with less "head room").
    - It would be really cool to be able to have independent options for Spectrum, Peak and Spectrogram - for example to set the max  to 0 in Spectrum and to 1 or 2 in Peak meter. Or to set different amplitude steps to them (to see either more digits or less of them when using in small window - ex. Spectrum in large window with many digits and Peak meter in smaller one with not so many).  You made it possible to set different styles (colours) which is really great. The same would be great with other options.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-04 21:21:45
    Hi,

    thank you for the new version.

    I have tested it a bit and here are my observations:
    - Peak meter: I use it in horizontal position. It works well even if I change to full-screen and back. One drawback (it only appears in horizontal option) is when I want to disable either top or bottom digits. They all disappear (meaning I can only see either both or none). It is the same with left/right digits - disabling left or right really disables both. It only happens in the peak meter mode and only when horizontal. Plus it would be nice to be able to set the top value larger than 0 here in order to see some blank space on the top end or to see the whole bar when peak is higher than 0. Just like in built-in meter (but with less "head room").
    Confirmed. Must be due to some last minute optimizing. It has worked all through development.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: yeyo on 2024-04-05 03:22:39
    v0.7.5.0-beta2, 2024-03-31

    * New: Peak Meter visualization.
    * Improved: Edge cases for the scaling and position of the spectrum bars and curve vs. the X-axis.

    While in beta testing you can only download it from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.5.0-beta2).
    There is a problem with the gap between the two sides of the Y-axis when resizing the visualization panel, check out the video below:
    That's how it's supposed to react: The width of a bar adapts to the available space as an whole number; no more fractional bar widths and rounding errors.

    When the available space becomes width enough through resizing or through disabling the Y-axis for a wider bar the graph re-calculates and occupies the available space.
    I don't question the way you handle it, but the white space on both sides of the interface looks uncomfortable, especially when this visualization becomes part of the interface, meaning that I have to drag the window to a suitable width to avoid this problem , so I had to go back to 0.7.4.1, although it had some minor issues
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-05 05:16:38
    I don't question the way you handle it, but the white space on both sides of the interface looks uncomfortable, especially when this visualization becomes part of the interface, meaning that I have to drag the window to a suitable width to avoid this problem , so I had to go back to 0.7.4.1, although it had some minor issues
    Your choice. But it stays this way. There's no such thing as a 'fractional' pixel. Just add more bars to fill the gap. Look at how foo_musical_spectrum handled the situation.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-04-05 10:27:20
    The new version is looking great. Hopefully the disappearing artwork can be fixed soon. Also, despite the options the artwork (say like 500x500) does not fill the screen.  IE: There is always a border around it. I do not have this issue on other programs like Darkone's artwork panel or ESLyrics.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-05 10:29:54
    The new version is looking great. Hopefully the disappearing artwork can be fixed soon. Also, despite the options the artwork (say like 500x500) does not fill the screen.  IE: There is always a border around it. I do not have this issue on other programs like Darkone's artwork panel or ESLyrics.
    I had to make a choice: "Fit" means fit to the client area, that is the area used to render a curve or bars. Having the artwork appear behind the X or Y axis seemed messy to me.

    Edit: about the artwork, it may seem trivial but due to some technical reasons it is a hard problem.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-06 10:03:50
    - Spectrum: when playing 96/24 files and then bringing the popup - the art is there from the begining
    @wojak ,

    could you confirm the following observation, please:

    - Starting the component in a popup window when a track WITH ARTWORK starts playing or is playing, renders the artwork from the start.
    - Starting the component in a popup window when a track WITHOUT ARTWORK starts playing or is playing and then switch to a track WITH ARTWORK, does not render the artwork from the start.

    Thx.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: marc2k3 on 2024-04-06 10:53:17
    If you're having problems with now_playing_album_art_notify_manager, do it the old fashioned way...

    Code: [Select]
    metadb_handle_ptr handle = // now playing handle
    album_art_data_ptr data;

    auto api = album_art_manager_v2::get();
    auto guid = album_art_ids::cover_front;
    auto handles = pfc::list_single_ref_t<metadb_handle_ptr>(handle);
    auto guids = pfc::list_single_ref_t<GUID>(guid);

    try
    {
    auto instance = api->open(handles, guids, fb2k::noAbort);
    data = instance->query(guid, fb2k::noAbort);
    }
    catch (...) {}

    if (data.is_valid())
    {
    // do something
    }
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-06 11:42:02
    If you're having problems with now_playing_album_art_notify_manager, do it the old fashioned way...

    Code: [Select]
    metadb_handle_ptr handle = // now playing handle
    album_art_data_ptr data;

    auto api = album_art_manager_v2::get();
    auto guid = album_art_ids::cover_front;
    auto handles = pfc::list_single_ref_t<metadb_handle_ptr>(handle);
    auto guids = pfc::list_single_ref_t<GUID>(guid);

    try
    {
    auto instance = api->open(handles, guids, fb2k::noAbort);
    data = instance->query(guid, fb2k::noAbort);
    }
    catch (...) {}

    if (data.is_valid())
    {
    // do something
    }

    Can't. Getting the artwork is not thread safe. It has to occur in the UI thread so I have to rely on a complicated song-and-dance to coordinate the resource creation in the UI (for the configuration dialog) and the render thread.

    Edit: But I think I cracked it. Running stress tests as I write this.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-06 13:54:52
    v0.7.5.1, 2024-04-06

    * Fixed: Peak Meter axes now behave as intended.
    * Fixed: Sample rate initialization and Nyquist frequency marker display when the component is used in a popup window.
    * Fixed: Disappearing artwork when the component is used in a popup window.

    You can download it from the Component (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.5.1).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: misio on 2024-04-06 14:28:51
    v0.7.5.1, 2024-04-06

    RMS meter is not calibrated at all.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-06 14:40:17
    Where should I address things regarding the PeakLED meter? In this thread or in the Peakmeter Spectrum component thread?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-06 15:22:19
    v0.7.5.1, 2024-04-06
    RMS meter is not calibrated at all.
    Says who?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-06 15:22:42
    Where should I address things regarding the PeakLED meter? In this thread or in the Peakmeter Spectrum component thread?
    Here. It's part of this component.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: misio on 2024-04-06 16:11:47
    v0.7.5.1, 2024-04-06
    RMS meter is not calibrated at all.
    Says who?

    RMS meter shows the same incorrect values as RMS meter embedded in Foobar.
    Take a look at the screenshot: -20dBFS pink noise.
    All the RMS meters should be calibrated according to IEC 61606:1997 / AES17-1998 standard - so called RMS+3.
    And all the RMS meters on pro market are calibrated to AES-17 - no matter if it is ProTools, Sequoia, WaveLab, etc.

    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-06 16:19:30
    RMS meter shows the same incorrect values as RMS meter embedded in Foobar.
    Take a look at the screenshot: -20dBFS pink noise.
    All the RMS meters should be calibrated according to IEC 61606:1997 / AES17-1998 standard - so called RMS+3.
    And all the RMS meters on pro market are calibrated to AES-17 - no matter if it is ProTools, Sequoia, WaveLab, etc.
    Well, it is an eye candy component, not a scientific instrument. But I'll make an effort.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: misio on 2024-04-06 16:25:58
    RMS meter shows the same incorrect values as RMS meter embedded in Foobar.
    Take a look at the screenshot: -20dBFS pink noise.
    All the RMS meters should be calibrated according to IEC 61606:1997 / AES17-1998 standard - so called RMS+3.
    And all the RMS meters on pro market are calibrated to AES-17 - no matter if it is ProTools, Sequoia, WaveLab, etc.
    Well, it is an eye candy component, not a scientific instrument. But I'll make an effort.
    It would be great!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Cosh on 2024-04-06 17:08:59
    I stuck with  layout setting. Axis lines overlap bands 🙄 I would like to keep axis lines ON without overlapping bands, is there a way to do it? A tick option? I couldn't find a way 🤔🤔
    (https://i.postimg.cc/nzx8Zmkv/bands.jpg)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-06 19:19:38
    RMS meter shows the same incorrect values as RMS meter embedded in Foobar.
    Take a look at the screenshot: -20dBFS pink noise.
    All the RMS meters should be calibrated according to IEC 61606:1997 / AES17-1998 standard - so called RMS+3.
    And all the RMS meters on pro market are calibrated to AES-17 - no matter if it is ProTools, Sequoia, WaveLab, etc.
    Well, it is an eye candy component, not a scientific instrument. But I'll make an effort.
    It would be great!
    @misio ,

    Better? I read this (https://skippystudio.nl/2021/07/sound-intensity-and-decibels/#) but had trouble determining Amax. Experimentally using a 96kbps 997 Hz sine wave I determined it to be 0.28117.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-06 19:23:22
    I stuck with  layout setting. Axis lines overlap bands 🙄 I would like to keep axis lines ON without overlapping bands, is there a way to do it? A tick option? I couldn't find a way 🤔🤔
    (https://i.postimg.cc/nzx8Zmkv/bands.jpg)
    @cosh,

    That's by design. The code tries to center the vertical graph line within a bar.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-04-06 20:41:17
    I stuck with  layout setting. Axis lines overlap bands 🙄 I would like to keep axis lines ON without overlapping bands, is there a way to do it? A tick option? I couldn't find a way 🤔🤔
    I just went to Styles/Horizontal(Vertical) Grid Line and played with both Opacity and Color until they still appear faintly against the graph background but are no longer discernible in the bars themselves--clean again!  It looks like you are using LED so I don't know if that will work for you or not.

    (https://i.imgur.com/Lj9hFhp.png)

    Other:  I went from 0740 to 0751 via Foobar update and found a couple of other things I needed to change, one was changing my Spectrum Smoothing from Peak/.7 to Average/.3 to get a visual equivalent in bar movement.  A nice find was that now when the display window is horizontally resized the X-axis frequencies are re-adjusted to keep the correct numerical value.  Didn't even realize this was not occuring in 0740.  A lot more than just "eye candy" going on, thanks pqyt.

    P.S.  people also using the spectrum with Foobar 1.6.17 will find that 0751 works well there too, but do not attempt to import a preset made for it into a 0751 install on v.2.2 x64, the settings will NOT carry over!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-06 21:02:23
    P.S.  people also using the spectrum with Foobar 1.6.17 will find that 0751 works well there too, but do not attempt to import a preset made for it into a 0751 install on v.2.2 x64, the settings will NOT carry over!
    32-bit fb2k's can exchange presets. The same for 64-bit. But no cross-sharing.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-06 21:45:37
    Hi, 
    everything works fine now (Nyquist and art). Thank you.

    I got into trouble trying to use your componet like that:
    -using DUI and making horizontal peak meter as part of layout ("embedded") and occasionally trying to bring the Spectrum as a popup is not possible. When asking to enable the Spectrum, the Peakmeter flashes to inform me thet I already run this plugin. I use many colours in Spectrum but only black and white in Peakmeter. To overcome the inability to popup Spectrum when Peakmeter is embedded in the layout I thought that I would change the functionality by right clicking on the Peakmeter when needed and switch to Spectrum and doubleclick to make it fullscreen (because Peakmeter window is wide and flat) but when switching to Spectrum the Spectrum shows as black and white (just like Peakmeter) desptie it being set to use many colours. This only happens when the plugin is set as embedded and changed between functions. It works OK when not embedded and being just popped-up (the spectrum is in colour and Perakmeter in BW) then). Plus making this now BW Spectrum fullscreen switches it to be Peakmeter.
    To sum it up: I set Peakmeter to be embedded in DUI then during playback click to change it to be Spectrum for a moment. The spectrum has wrong colors and when it is doublecliked to make it fullscreen it swithces to fullscreen Peakmeter.

    Additions feature requests:
    - Peak meter ceiling above 0dB (if not possible to make it independent, that option could be a feature for all parts of your plugin as well)
    - independent options for steps, ceilings and displayed digits on the axis (I can't make it only left and bottom for Peakmeter and have all four sides on for Spectrum).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-06 23:33:34
    I got into trouble trying to use your componet like that:
    To sum it up: I set Peakmeter to be embedded in DUI then during playback click to change it to be Spectrum for a moment. The spectrum has wrong colors and when it is doublecliked to make it fullscreen it swithces to fullscreen Peakmeter.
    That will not work. In DUI a fullscreen view is another instance of the same component with it's own settings. You can verify this by alt-tabbing to the main player window and moving it to another monitor. You'll see there are 2 components running. That's how the fb2k SDK works.

    CUI works differently. It does not AFAIK have a way to switch to fullscreen so I wrote my own by re-using the window of the component. That's why in CUI there is only one instance and one config.
    - Peak meter ceiling above 0dB (if not possible to make it independent, that option could be a feature for all parts of your plugin as well)
    Working on it while I try to add calibration.
    - independent options for steps, ceilings and displayed digits on the axis (I can't make it only left and bottom for Peakmeter and have all four sides on for Spectrum).
    Yes, you can if you use a separate component instance for peak meter and spectrum. That's how it was designed. My test setup has 3 instances: a spectrum and a horizontal and vertical peak meters each with their own settings.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-04-07 03:57:08
    That will not work. In DUI a fullscreen view is another instance of the same component with it's own settings. You can verify this by alt-tabbing to the main player window and moving it to another monitor. You'll see there are 2 components running. That's how the fb2k SDK works.
    That's exactly how it is for all visualizations (not just this component and Enhanced Spectrum analyzer obviously) with fullscreen support, including foobar2000's built-in visualizations, so for anyone who throwing complaints at fullscreen mode being different, please read this!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-07 16:12:37
    I got into trouble trying to use your componet like that:
    To sum it up: I set Peakmeter to be embedded in DUI then during playback click to change it to be Spectrum for a moment. The spectrum has wrong colors and when it is doublecliked to make it fullscreen it swithces to fullscreen Peakmeter.
    That will not work. In DUI a fullscreen view is another instance of the same component with it's own settings. You can verify this by alt-tabbing to the main player window and moving it to another monitor. You'll see there are 2 components running. That's how the fb2k SDK works.

    CUI works differently. It does not AFAIK have a way to switch to fullscreen so I wrote my own by re-using the window of the component. That's why in CUI there is only one instance and one config.
    - Peak meter ceiling above 0dB (if not possible to make it independent, that option could be a feature for all parts of your plugin as well)
    Working on it while I try to add calibration.
    - independent options for steps, ceilings and displayed digits on the axis (I can't make it only left and bottom for Peakmeter and have all four sides on for Spectrum).
    Yes, you can if you use a separate component instance for peak meter and spectrum. That's how it was designed. My test setup has 3 instances: a spectrum and a horizontal and vertical peak meters each with their own settings.

    But how do I open two instance of the same component either both as popups or one as popup and one embedded in DUI? Or is it only possible to enable two embedded?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-07 16:48:18
    I got into trouble trying to use your componet like that:
    To sum it up: I set Peakmeter to be embedded in DUI then during playback click to change it to be Spectrum for a moment. The spectrum has wrong colors and when it is doublecliked to make it fullscreen it swithces to fullscreen Peakmeter.
    That will not work. In DUI a fullscreen view is another instance of the same component with it's own settings. You can verify this by alt-tabbing to the main player window and moving it to another monitor. You'll see there are 2 components running. That's how the fb2k SDK works.

    CUI works differently. It does not AFAIK have a way to switch to fullscreen so I wrote my own by re-using the window of the component. That's why in CUI there is only one instance and one config.
    - Peak meter ceiling above 0dB (if not possible to make it independent, that option could be a feature for all parts of your plugin as well)
    Working on it while I try to add calibration.
    - independent options for steps, ceilings and displayed digits on the axis (I can't make it only left and bottom for Peakmeter and have all four sides on for Spectrum).
    Yes, you can if you use a separate component instance for peak meter and spectrum. That's how it was designed. My test setup has 3 instances: a spectrum and a horizontal and vertical peak meters each with their own settings.

    But how do I open two instance of the same component either both as popups or one as popup and one embedded in DUI? Or is it only possible to enable two embedded?
    I don't think you can using only the standard DUI. Maybe foo_flowin (https://github.com/ttsping/foo_flowin) can help?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-07 17:58:49
    Quote
    I don't think you can using only the standard DUI. Maybe foo_flowin (https://github.com/ttsping/foo_flowin) can help?

    Thank you!!! I works almost 100%.
    I embedded horizontal Peak meter in DUI with BW colors and left/bottom scale. Then set the Spectrum in Flowin and it works with proper colors, art and Nyquist and all four scales. I can manually resize it and it is still OK.
    The only defect is that when I make that "flowin Spectrum" fullscreen by double cliking on it, it becomes full screen Peak meter with colors from Spectrum (not BW) and not horizontal. So it changes its function but not set options. But the embedded Peak Meter stays OK,. If I then double click on that flowin it goes back to proper flowin Spectrum.
    I will test it more but for now it is the only one minor defect.
    Once again thank you for the flowin suggestion and great plugin.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Xin-Hong on 2024-04-08 18:05:35
    Hello pqrt,

    Thanks for all of the improvements, especially for the LED thickness and gap !

    Since some last releases I have vertical red lines, their position is moving according to the number of bands or if I adjust the size of the panel.

    There is a gap between the left channel (horizontally flipped) and the right channel. I didn't had this problem with previous releases, 0.7.4 or 0.7.3

    X
    Title: Re: foo_vis_spectrum_analyzer
    Post by: L.E.D. on 2024-04-08 18:44:18
    Hello pqrt,

    Thanks for all of the improvements, especially for the LED thickness and gap !



    Since some last releases I have vertical red lines, their position is moving according to the number of bands or if I adjust the size of the panel.

    There is a gap between the left channel (horizontally flipped) and the right channel. I didn't had this problem with previous releases, 0.7.4 or 0.7.3

    [attach type=thumb]30078[/attach]

    This is the Nyquist Frequency, you can change it in the styles section.

    Thx for this plugin pqrt great work.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-08 19:03:33
    Hello pqrt,

    Thanks for all of the improvements, especially for the LED thickness and gap !

    Since some last releases I have vertical red lines, their position is moving according to the number of bands or if I adjust the size of the panel.

    There is a gap between the left channel (horizontally flipped) and the right channel. I didn't had this problem with previous releases, 0.7.4 or 0.7.3
    [attach type=thumb]30078[/attach]
    You'll have to add a couple more FFT bins to both graphs to pad the gap. After experimenting on many scaling strategies I settled on having the bars centered because there is no such thing as a 'fractional' pixel.
    For 2 graph scenarios it may be difficult to get right. Maybe I'll add an option to specify the alignment and padding.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-04-09 07:05:43
    v0.7.5.1, 2024-04-06

    * Fixed: Peak Meter axes now behave as intended.
    * Fixed: Sample rate initialization and Nyquist frequency marker display when the component is used in a popup window.
    * Fixed: Disappearing artwork when the component is used in a popup window.

    You can download it from the Component (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.5.1).

    I'm happy to report that the disappearing artwork is definitely a thing of the past now.

    There's just one more thing (artwork wise) and that is smaller artwork (smaller than my window size) still does not fill when fill is selected. There is always a border around it, no matter which option is selected. Again, I don't have this problem with ESLyrics and DarkOne's cover art script.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-09 10:13:41
    There is always a border around it, no matter which option is selected. Again, I don't have this problem with ESLyrics and DarkOne's cover art script.
    @Majestyk , I already answered that one: the "Fit" is restricted to the client area, that is the area used by the actual graphs (bars, curve, etc). It excludes the axes because I found it messy. The idea was that if you want to use the full height or width the user would disable the relevant axes. Wrong assumption?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-10 12:55:42
    v0.7.5.2, 2024-04-10

    * Improved: Peak Meter
      * Calibrated the peak meter according to the IEC 61606:1997 / AES17-1998 standard (RMS +3).
      * Added style to display the RMS value as text.
      * Reduced jitter.
    * Improved: Increased the maximum amplitude to +6dB.
    * Improved: Optimized rendering the axes a little bit and tried to preserve the more imported labels.
    * Improved: Artwork fit mode can use the full component window instead of just the client area of the graph.
    * Fixed: Setting the LED size and LED gap both to zero caused the component to freeze.
    * Fixed: Artwork fit mode "Fill" was implemented backwards.

    You can download it from the Component (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.5.2).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-10 13:51:22
    v0.7.5.2, 2024-04-10

    * Improved: Peak Meter
      * Calibrated the peak meter according to the IEC 61606:1997 / AES17-1998 standard (RMS +3).
      * Added style to display the RMS value as text.
      * Reduced jitter.
    * Improved: Increased the maximum amplitude to +6dB.
    * Improved: Optimized rendering the axes a little bit and tried to preserve the more imported labels.
    * Improved: Artwork fit mode can use the full component window instead of just the client area of the graph.
    * Fixed: Setting the LED size and LED gap both to zero caused the component to freeze.
    * Fixed: Artwork fit mode "Fill" was implemented backwards.

    You can download it from the Component (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.5.2).

    Good progress.

    Some questions/remarks only about Peak Meter:

    1) I want to be able to change the display color when dB above 0 (for me red; no gradient needed)
    2) I'd like to define the amount of pixels between channel bars. Now the gap in the vertical PeakMeter is larger than the one in the horizontal. So typically the amount of space available to the channel bars should be lowered by channel-bar-spacing times channels minus 1). If that results in some slack space that slack space should be centered left/right in the panel (or top/bottom)
    3) The textdisplay of the levels in bars is too distracting for me. I cannot find an off knob. Changed the colors to 100% alpha. Is that what you intended?
    4) There's to many dB values displayed in the Decibel axe; also distracting for me. Would it be possible (like in the original component to specify which values you want to show? In my case I display -48, -36, -26, -18, -12, -8, -4, 0.
    5) Would it be possible where you want the Decibel display. Old component you can tell it to be displayed between channels.
    6) Can you define in what sequence channels are displayed. I want SL+SR before BL+ BR. This functionality is for instance in old WaveSeekbar.

    EDIT: Middle panel has this component vertical and horizontal. Right panel has original component vertical and horizontal.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-10 13:59:21
    @pqyt

    Last thing. The original component also holds the maximum (which drop after a short time). See video.

    Is this somehow configurable in your component? I could not find it.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: JesalRo on 2024-04-10 14:41:04
    I have seen that in the latest update it is possible to incorporate a horizontal spectrogram of two stereo channels.
    Thank you for your attention to my request. I hope that in future updates we will have more option configurations for this stereo mode.
    Thanks for your work
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-10 14:53:17
    1) I want to be able to change the display color when dB above 0 (for me red; no gradient needed)
    I can probably solve that with a separate style.

    2) I'd like to define the amount of pixels between channel bars. Now the gap in the vertical PeakMeter is larger than the one in the horizontal. So typically the amount of space available to the channel bars should be lowered by channel-bar-spacing times channels minus 1). If that results in some slack space that slack space should be centered left/right in the panel (or top/bottom)
    The uneven gap is caused by a work-around for a bug in the Direct2D function I'm using: if the start coordinate is uneven it failed to render the LEDs completely. I'll see if I can find a compromise.

    3) The textdisplay of the levels in bars is too distracting for me. I cannot find an off knob. Changed the colors to 100% alpha. Is that what you intended?
    Color Source "None" disables the rendering of each styled element individually.

    4) There's to many dB values displayed in the Decibel axe; also distracting for me. Would it be possible (like in the original component to specify which values you want to show? In my case I display -48, -36, -26, -18, -12, -8, -4, 0.
    Have you tried the Amplitude Step setting on the Graphs page?

    5) Would it be possible where you want the Decibel display. Old component you can tell it to be displayed between channels.
    Between the channels makes no sense if each channels has a separate RMS value.

    6) Can you define in what sequence channels are displayed. I want SL+SR before BL+ BR. This functionality is for instance in old WaveSeekbar.
    There is no way to do that now. That would also mean creating a GUI to specify the channel combinations. The current design specifically supports more than 2 channels. Try playing a 7.1 track.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-10 14:55:01
    @pqyt
    Last thing. The original component also holds the maximum (which drop after a short time). See video.
    The hold and decay is currently implemented on the main peak and RMS values. There is no separate Max indicator.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-04-10 15:13:36
    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 (https://codepen.io/TF3RDL/pen/poQJwRW) 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 (https://codepen.io/TF3RDL/pen/poQJwRW), but also another one (https://codepen.io/TF3RDL/pen/MWLzPoO)) are the same as eachother (if applicable)?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: MaFred on 2024-04-10 16:30:14
    Thanks for v0.7.5.2! Unfortunately an error has crept in. In the lower scale, the values are partially superimposed. I use CUI.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Dfaure on 2024-04-10 17:57:30
    Hi,
    Thanks for the very very nice component.

    I'd like two improvements:
    1) allow to have different type of graph simultanously (ie. a spectrogram and some bars for example)
    2) allow the graphs to be rotated.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: misio on 2024-04-10 18:45:23
    v0.7.5.2, 2024-04-10

    * Improved: Peak Meter
      * Calibrated the peak meter according to the IEC 61606:1997 / AES17-1998 standard (RMS +3).
     

    Almost OK but... please take a look at the screenshot.
    Your values are still incorrect but i'm shure you can fix it :)
    A few years ago there was a quite interesting discussion (pro audio forum Gearslutz) about RMS meters:
    https://gearspace.com/board/mastering-forum/387136-i-need-correct-rms-meter.html
    Bob Katz put a link to his calibration audio file just to help to calibrate and to test RMS meters.
    This link is dead but you can find a copy here:
    https://filetransfer.io/data-package/DSTfAHUE#link
    https://www.file.io/mCub/download/k1imtkjgGu8J



    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-04-10 19:19:54
    This is mostly offtopic, but can you explain why exactly that ancient IEC 61606:1997 spec is what should be followed, when both it and several of its replacements have been withdrawn and replaced by newer versions? Also can you point to a place where it can be acquired for free? I only see it being sold.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-10 19:20:07
    1) allow to have different type of graph simultanously (ie. a spectrogram and some bars for example)
    Just add another instance of the component with a different visualization.
    2) allow the graphs to be rotated.
    You can flip the graphs horizontally and vertically. I don't see the point of having an arbitrary rotation angle.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-10 19:25:08
    v0.7.5.2, 2024-04-10

    * Improved: Peak Meter
      * Calibrated the peak meter according to the IEC 61606:1997 / AES17-1998 standard (RMS +3).
     
    Almost OK but... please take a look at the screenshot.
    Your values are still incorrect but i'm shure you can fix it :)
    A few years ago there was a quite interesting discussion (pro audio forum Gearslutz) about RMS meters:
    https://gearspace.com/board/mastering-forum/387136-i-need-correct-rms-meter.html
    Bob Katz put a link to his calibration audio file just to help to calibrate and to test RMS meters.
    This link is dead but you can find a copy here:
    https://filetransfer.io/data-package/DSTfAHUE#link
    https://www.file.io/mCub/download/k1imtkjgGu8J
    I'm afraid not. I went through the math reference back and forth and the only formula I found was dividing the RMS value by sqrt(2). The tone://997,30 on fb2k x64 confirms this. I'll need the help of some audio wizard to point me the way.

    Edit: Isn't the difference just the +3.0dB?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-10 19:27:34
    This is mostly offtopic, but can you explain why exactly that ancient IEC 61606:1997 spec is what should be followed, when both it and several of its replacements have been withdrawn and replaced by newer versions? Also can you point to a place where it can be acquired for free? I only see it being sold.
    I found a 'free' draft but it only gives a couple of definitions. The following article was more helpful: https://skippystudio.nl/2021/07/sound-intensity-and-decibels/
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-10 19:43:20
    Thanks for v0.7.5.2! Unfortunately an error has crept in. In the lower scale, the values are partially superimposed. I use CUI.
    Thx. for the report. It's a stupid regression. Fixed in the next version.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-10 19:45:08
    @pqyt
    Last thing. The original component also holds the maximum (which drop after a short time). See video.
    The hold and decay is currently implemented on the main peak and RMS values. There is no separate Max indicator.
    @Defender , added it to the upcoming 0.7.5.3.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-10 19:46:05
    1) I want to be able to change the display color when dB above 0 (for me red; no gradient needed)
    I can probably solve that with a separate style.
    @Defender , added it to the upcoming 0.7.5.3.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-10 19:47:02
    The hold and decay is currently implemented on the main peak and RMS values. There is no separate Max indicator.

    added it to the upcoming 0.7.5.3.

    👌
    Title: Re: foo_vis_spectrum_analyzer
    Post by: misio on 2024-04-10 19:59:34
    This is mostly offtopic, but can you explain why exactly that ancient IEC 61606:1997 spec is what should be followed, when both it and several of its replacements have been withdrawn and replaced by newer versions? Also can you point to a place where it can be acquired for free? I only see it being sold.

    All the meters in pro audio world are calibrated according to AES-17/IEC 61606. This standard is not ancient! RMS meters are still in use and are implemented in every pro-DAW. Just download a demo of any pro-DAW and check it out.
    Meters should be calibrated in some way. If meter is not calibrated then it is useless - it shows something but no one knows what.
    For instance, a meter called "VU Meter" embedded in Foobar is not a VU meter at all. It is a RMS meter (a kind of) and its readouts are wrong. It could be repaired very simply I guess. It needs just +3dB more and RMS window = 600 ms.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: misio on 2024-04-10 20:23:08
    Also can you point to a place where it can be acquired for free? I only see it being sold.
    BS EN 61606-1997 / IEC 61606-1997 - for free one can find it here:
    https://www.doc88.com/p-67516226856665.html
    Download is impossible but there is a full preview. Of course the main site needs translating.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-10 20:25:02
    This is mostly offtopic, but can you explain why exactly that ancient IEC 61606:1997 spec is what should be followed, when both it and several of its replacements have been withdrawn and replaced by newer versions? Also can you point to a place where it can be acquired for free? I only see it being sold.

    All the meters in pro audio world are calibrated according to AES-17/IEC 61606. This standard is not ancient! RMS meters are still in use and are implemented in every pro-DAW. Just download a demo of any pro-DAW and check it out.
    Meters should be calibrated in some way. If meter is not calibrated then it is useless - it shows something but no one knows what.
    For instance, a meter called "VU Meter" embedded in Foobar is not a VU meter at all. It is a RMS meter (a kind of) and its readouts are wrong. It could be repaired very simply I guess. It needs just +3dB more and RMS window = 600 ms.

    Funny to how people can have different perspectives to plugins. I for instance don't care if the readouts are conforming to standard X or Y or just plain wrong. I'm here for the looks and eye candy.
    I rely on things like replaygain to have a decent playing experience.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-10 21:12:39
    It needs just +3dB more and RMS window = 600 ms.
    @misio ,
    Please explain or point me to an online resource. I'd like to learn. I never found a mention about an RMS time window.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-10 21:15:04
    This is mostly offtopic, but can you explain why exactly that ancient IEC 61606:1997 spec is what should be followed, when both it and several of its replacements have been withdrawn and replaced by newer versions? Also can you point to a place where it can be acquired for free? I only see it being sold.

    All the meters in pro audio world are calibrated according to AES-17/IEC 61606. This standard is not ancient! RMS meters are still in use and are implemented in every pro-DAW. Just download a demo of any pro-DAW and check it out.
    Meters should be calibrated in some way. If meter is not calibrated then it is useless - it shows something but no one knows what.
    For instance, a meter called "VU Meter" embedded in Foobar is not a VU meter at all. It is a RMS meter (a kind of) and its readouts are wrong. It could be repaired very simply I guess. It needs just +3dB more and RMS window = 600 ms.

    Funny to how people can have different perspectives to plugins. I for instance don't care if the readouts are conforming to standard X or Y or just plain wrong. I'm here for the looks and eye candy.
    I rely on things like replaygain to have a decent playing experience.
    In the beginning I used to agree. But now that I get a better grasp on the math (still a very tiny grasp) why not make the effort to make it as accurate as possible?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: misio on 2024-04-10 22:15:00
    It needs just +3dB more and RMS window = 600 ms.
    @misio ,
    Please explain or point me to an online resource. I'd like to learn. I never found a mention about an RMS time window.
    So called time window is scalable in ms. Usually is used 600 ms. The lower the value the speed of rms meter is faster. If the needle (bar) is moving too fast then it is hard to properly judge the loudness.
    In Samplitude DAW 'time window' is marked as 'integration time'. In Samplitude default value = 2500 ms which is a bit strange.

    Title: Re: foo_vis_spectrum_analyzer
    Post by: misio on 2024-04-10 22:35:57
    Please explain or point me to an online resource. I'd like to learn. I never found a mention about an RMS time window.

    Just not to complicate to much it would be OK if your RMS meter shows the same readouts as so called 'VU meter' in Foobar but with values + 3dB. And the rms bar should not moving so fast.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-04-11 02:50:39
    Fill works, thanks for the fix. Unfortunately, the artwork is disappearing again.

    EDIT... I was playing with v0.7.5.1 and the artwork disappears as well, but only when you repeat a track. But the new version it just plain disappears half the time a track is played.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-04-11 10:20:46
    The following article was more helpful: https://skippystudio.nl/2021/07/sound-intensity-and-decibels/
    So it seems. To quote:
    Quote
    Now we have defined RMS for a sinus wave we can return to dBFS. In standard IEC 61606-3 we find the following definitions:

        Definition 3.4 dBFS. The RMS amplitude of a sinusoid described in 3.10 is defined as 0 dBFS, where the amplitude of any signal can be defined in dBFS as 20 times the common logarithm of the ratio of the RMS amplitude of the signal to that of the signal defined in 3.10.
        Definition 3.10 Full scale amplitude. Amplitude of a 997 Hz sinusoid whose peak positive sample just reaches positive digital full-scale (in 2’s complement a binary value of 0111…1111 to make up the word length) and whose peak negative sample just reaches a value one away from negative digital full-scale (1000…0001 to make up the word length) leaving the maximum negative code (1000…0000) unused.

    BS EN 61606-1997 / IEC 61606-1997 - for free one can find it here:
    https://www.doc88.com/p-67516226856665.html
    Download is impossible but there is a full preview. Of course the main site needs translating.
    Alright, I exported that to PDF and read through it a couple of times. I don't see it defining how RMS meters should work at all. It describes how to measure analog equipment characteristics.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-11 13:02:28
    But the new version it just plain disappears half the time a track is played.
    Aarrrgh. Sorry 'bout that. When? When a new track starts? When something happens in the configuration dialog? During normal playing? I have 3 event sources spread over 2 threads that I need to coordinate so the specific conditions do matter.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: qqka08 on 2024-04-11 13:21:44
    Failed to load DLL: foo_vis_spectrum_analyzer.dll
    Reason: Не вдалося знайти вказану процедуру. 

    it was working fine, but after the update it crashes... i tried to install previous versions, but they all don't work now either, i installed it on a clean version of foobar - the result is the same
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Dfaure on 2024-04-11 16:18:38
    1) allow to have different type of graph simultanously (ie. a spectrogram and some bars for example)
    Just add another instance of the component with a different visualization.
    2) allow the graphs to be rotated.
    You can flip the graphs horizontally and vertically. I don't see the point of having an arbitrary rotation angle.

    In fact, I wanted to be able to define a display similar to the one submitted on reply #434 (https://hydrogenaud.io/index.php/topic,125031.msg1039691.html#msg1039691).
    But for this, if I could easily rely on two vertically stacked component instances, I would need at least a vertically scrolling spectrogram.

    In the same mood, If I want to get a bar graph at the right side of a regular scrolling spectrogram, I would need some kind of rotation.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-11 16:29:26
    1) allow to have different type of graph simultanously (ie. a spectrogram and some bars for example)
    Just add another instance of the component with a different visualization.
    2) allow the graphs to be rotated.
    You can flip the graphs horizontally and vertically. I don't see the point of having an arbitrary rotation angle.

    In fact, I wanted to be able to define a display similar to the one submitted on reply #434 (https://hydrogenaud.io/index.php/topic,125031.msg1039691.html#msg1039691).
    But for this, if I could easily rely on two vertically stacked component instances, I would need at least a vertically scrolling spectrogram.
    The waterfall spectogram is on my To Do list but not high. I haven't received any feedback about the spectogram so I assumed it was virtually not used.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Dfaure on 2024-04-11 17:16:26
    The waterfall spectogram is on my To Do list but not high. I haven't received any feedback about the spectogram so I assumed it was virtually not used.

    [our messages crossed each other]

    Combining the spectrogram with a musical scale (and a convenient mouse tooltip) is almost a cheatsheet for musician :)!

    I understand that this would need some extra tweaks, but as the D2D1::Matrix3x2F parameter of the Element::SetTransform() method was already handling rotation (cf documentation here (https://learn.microsoft.com/en-us/windows/win32/Direct2D/d2d1-matrix-3x2-f)), I think that won't be too difficult and in any case would greatly improve your already wonderful component.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-11 17:23:05
    The waterfall spectogram is on my To Do list but not high. I haven't received any feedback about the spectogram so I assumed it was virtually not used.

    [our messages crossed each other]
    I understand that this would need some extra tweaks, but as the D2D1::Matrix3x2F parameter of the Element::SetTransform() method was already handling rotation (cf documentation here (https://learn.microsoft.com/en-us/windows/win32/Direct2D/d2d1-matrix-3x2-f)), I think that won't be too difficult and in any case would greatly improve your already wonderful component.
    If only it were that easy... true, for the bitmap that would work but not for the axes. They have to be hand-coded. Letters and numbers don't rotate that well in Western alphabets...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Dfaure on 2024-04-11 18:18:11
    The waterfall spectogram is on my To Do list but not high. I haven't received any feedback about the spectogram so I assumed it was virtually not used.

    [our messages crossed each other]
    I understand that this would need some extra tweaks, but as the D2D1::Matrix3x2F parameter of the Element::SetTransform() method was already handling rotation (cf documentation here (https://learn.microsoft.com/en-us/windows/win32/Direct2D/d2d1-matrix-3x2-f)), I think that won't be too difficult and in any case would greatly improve your already wonderful component.
    If only it were that easy... true, for the bitmap that would work but not for the axes. They have to be hand-coded. Letters and numbers don't rotate that well in Western alphabets...
    You're right. But you'll already did the hard job for an horizontal scale on the bar graph, and a vertical one for the current spectrogram implementation...

    Comparing with the core spectrogram is revealing that the graphic zone is erased and redrawn quite often, noticeably at song change.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Majestyk on 2024-04-12 21:00:30
    But the new version it just plain disappears half the time a track is played.
    Aarrrgh. Sorry 'bout that. When? When a new track starts? When something happens in the configuration dialog? During normal playing? I have 3 event sources spread over 2 threads that I need to coordinate so the specific conditions do matter.

    It can happen in normal play and skipping tracks.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-12 21:32:41
    But the new version it just plain disappears half the time a track is played.
    Aarrrgh. Sorry 'bout that. When? When a new track starts? When something happens in the configuration dialog? During normal playing? I have 3 event sources spread over 2 threads that I need to coordinate so the specific conditions do matter.
    It can happen in normal play and skipping tracks.
    As a pop-out window? Or embedded? I really need more details. It never happens here.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-13 11:22:11
    v0.7.5.3, 2024-04-13

    * Improved: Peak Meter
      * Added style to display the peak and RMS values larger than 0dB.
      * Added style to display the top peak value.
      * RMS Window is now configurable. Defaults to 300ms. This makes the RMS value more stable. The RMS is relative to 0 dBFS + 3.01 dB.
      * The level values were not calculated correctly when the selected channels did not correspond to the channel configuration of the track.
    * Fixed: Overlap of the X-axis labels (Regression)

    You can download it from the Component (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.5.3).

    Special thanks to @Case for helping me with the confusing results during development.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: misio on 2024-04-13 12:19:31
    v0.7.5.3, 2024-04-13
      * RMS Window is now configurable. Defaults to 300ms. This makes the RMS value more stable. The RMS is relative to 0 dBFS + 3.01

    It is going better but still not OK.
    I try to explain as simple as I can.
    One picture is better then hundred words so take a look at the picture.
    RMS readout embedded in Foobar meter is wrong - it shows -23dBFS
    Your RMS meter shows -17dBFS
    But the correct value should be -20dBFS
    The Bob Katz's calibration file is prepared to show exactly -20dBFS RMS
    Just download that file and check it out yourself: https://www.file.io/YGvo/download/vwcD5yyftPHK
    That file in properly calibrated meter will show -20dBFS RMS and -11.3dBFS Peak

    And thank you very much for scalable RMS Window!!!
    It is really a great job, mate!

    It will be a very useful meter if you fix the readouts.
    RMS+3dB standard means that this wrong RMS readout which one can see in embedded Foobar meter (called VU meter) can be very simply fixed by just adding 3dB more.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-13 12:46:40
    Quick response.

    Found the color settings for >0dB and the Max (with gravity or fade-out). Very nice.

    I'm (also) struggling with the much higher output levels which are not comparable to all other plugins I'm using (ChannelSpectrum, PeakmeterSpectrum, VU Meter).
    Is there a setting to turn down the notch a bit?

    EDIT: Hmmm, however if I play with RG set to trackmode and Preferences/Playback/PreAmp is set to 0.0dB your peakmeter go exactly to 0.0dB in the loud parts, which is I think how RG is intended.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-13 13:39:13
    v0.7.5.3, 2024-04-13
      * RMS Window is now configurable. Defaults to 300ms. This makes the RMS value more stable. The RMS is relative to 0 dBFS + 3.01
    Your RMS meter shows -17dBFS
    That's the +3 dB (which I explicitly add to the calculated value). The scale is dB, not dBFS. Please see my previous question:

    Most examples I see use dB as a unit, even though it's a relative number. Is it better practice to display dBFS?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-13 14:19:19
    In case of MCH channels SL and SR are displayed but do not show the volume anymore. This was fine in the previous version.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: misio on 2024-04-13 14:27:17
    That's the +3 dB (which I explicitly add to the calculated value). The scale is dB, not dBFS. Please see my previous question:
    Most examples I see use dB as a unit, even though it's a relative number. Is it better practice to display dBFS?

    In every DAW there is always dBFS scale - always. This is the most common scale today in the world of digital audio. No matter if it is ProTools, Samplitude, Wavelab etc. you will find there meters i dBFS. Some plugins (like freeware Voxengo Span) allow to choose the scale: RMS dBFS, RMS dBFS+3, K-Metering or LUFS.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-04-13 14:53:17
    That's the +3 dB (which I explicitly add to the calculated value). The scale is dB, not dBFS. Please see my previous question:
    Most examples I see use dB as a unit, even though it's a relative number. Is it better practice to display dBFS?

    In every DAW there is always dBFS scale - always. This is the most common scale today in the world of digital audio. No matter if it is ProTools, Samplitude, Wavelab etc. you will find there meters i dBFS. Some plugins (like freeware Voxengo Span) allow to choose the scale: RMS dBFS, RMS dBFS+3, K-Metering or LUFS.

    Yep, dBFS is relative to the maximum value of digital audio (if you don't count floating-point formats) as no fixed-point format (including 32-bit integer obviously) would cut it when comes to peaks above 0dBFS, so I think it is the best practice to display dBFS on @pqyt's spectrum analyzer component, especially the peakmeter

    BTW, the reason for having dBFS scale on linear/nth root amplitude scale peakmeter and spectrum is because I think it is still useful even if the amplitude scale is not logarithmic, especially some DAWs have peakmeters that have non-logarithmic amplitude scale to presumably display -Infinity dBFS (absolute silence)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-13 16:44:02
    In case of MCH channels SL and SR are displayed but do not show the volume anymore. This was fine in the previous version.
    Have you selected the channels for display? Note the comment in the release notes:

    "The level values were not calculated correctly when the selected channels did not correspond to the channel configuration of the track."
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-13 16:56:25
    In case of MCH channels SL and SR are displayed but do not show the volume anymore. This was fine in the previous version.
    Have you selected the channels for display? Note the comment in the release notes:

    "The level values were not calculated correctly when the selected channels did not correspond to the channel configuration of the track."

    Absolutely.
    In 6ch and 8ch it won't show SL+SR. For reference old Peakmeter next to it displaying 8 channels.

    If 6ch has SL+SR it doesn't show SL+SR. If 6ch has BL+BR instead they do show) (unless I have DSP rear to side ON).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-13 17:05:49
    Some samples.

    It just won't show values on SL and SR.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-13 17:46:38
    Hi,
    the peak meter shows wrong values now. When I play a track that has a true peak (calculated at 8x oversampling) at 0,3, the component shows more than 3. All other plugins show proper values (SPAN, built-in foobar peak meter and many others).
    Now the componet alnmost always shows red (above 0) which is ridiculous. I have original pressings made in the 1980s that very rarely go above 0 and usually have DR12. Please reverse to the previous calculations that were correct.

    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-13 18:37:45
    Some samples.

    It just won't show values on SL and SR.
    Confirmed. There was a bug in the algorithm if the channel configuration contained a non-continuous channel selection. A complicated way of saying: I messed up.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-13 18:41:07
    Hi,
    the peak meter shows wrong values now. When I play a track that has a true peak (calculated at 8x oversampling) at 0,3, the component shows more than 3. All other plugins show proper values (SPAN, built-in foobar peak meter and many others).
    Now the componet alnmost always shows red (above 0) which is ridiculous. I have original pressings made in the 1980s that very rarely go above 0 and usually have DR12. Please reverse to the previous calculations that were correct.
    I don't know what true peak and the impact of oversampling is. And multiple users who are, I assume, in the know confirmed the current results. The SOS test suite also shows that the dBFS values are correct.

    Maybe there's an extra parameter that I don't know of (yet) but the current algorithm is correct.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-13 18:54:24
    v0.7.5.4, 2024-04-13

    * Peak Meter
      * Changed: Swiched the unit from dB to dBFS.
      * Fixed: Some channel configurations (e.g. with side channels) were not displayed correctly.

    You can download it from the Component (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.5.4).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-13 18:57:55
    Hi,
    the peak meter shows wrong values now. When I play a track that has a true peak (calculated at 8x oversampling) at 0,3, the component shows more than 3. All other plugins show proper values (SPAN, built-in foobar peak meter and many others).
    Now the componet alnmost always shows red (above 0) which is ridiculous. I have original pressings made in the 1980s that very rarely go above 0 and usually have DR12. Please reverse to the previous calculations that were correct.
    I don't know what true peak and the impact of oversampling is. And multiple users who are, I assume, in the know confirmed the current results. The SOS test suite also shows that the dBFS values are correct.

    Maybe there's an extra parameter that I don't know of (yet) but the current algorithm is correct.

    I think that others said earlier that RMS was wrong (I do not know, maybe it was, and maybe now it is ok). I say that now Peak is wrong (and it was ok earlier). All my tracks show above 0 and the newer ones are above 3. Those are lossless (not mp3 with some extended peaks).  SACDs, HDCDs, "audiophile recordings" ... all go above 0..which is just not true. Now the component shows different peaks than every other component - are all of them wrong? 
    I assume that you increased RMS by 3 (maybe that is what it should be) but you also increased Peaks which were OK and now are too high by 3.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-13 19:12:52
    v0.7.5.4, 2024-04-13

    * Peak Meter
      * Changed: Swiched the unit from dB to dBFS.
      * Fixed: Some channel configurations (e.g. with side channels) were not displayed correctly.

    You can download it from the Component (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.5.4).

    0,7,5,4 seems to show proper Peaks.
    Thank you.

    EDIT: No, it still goes very red while other meters do not with the same tracks.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: misio on 2024-04-13 20:53:55
    v0.7.5.4, 2024-04-13

    * Peak Meter
      * Changed: Swiched the unit from dB to dBFS.

    GREAT, really great job! Thank you!
    RMS meter is OK - please do not touch it and do not try to change anything in it  :) 
    But PEAK meter is not correct.
    Peak meter embedded in Foobar works OK and its readouts are very OK, just like in every DAW. Your PEAK meter shows values a bit higher then it should be.
    Screenshot 1:
    1kHz, -30dBFS
    The precisely calibrated meter should show -30dBFS RMS and -30dBFS PEAK
    Screenshot 2:
    Pink noise -20dBFS RMS
    PEAK Meter in Foobar vs your PEAK meter = different values

    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-13 21:45:55
    But PEAK meter is not correct.
    Peak meter embedded in Foobar works OK and its readouts are very OK, just like in every DAW. Your PEAK meter shows values a bit higher then it should be.

    Screenshot 1:
    1kHz, -30dBFS
    The precisely calibrated meter should show -30dBFS RMS and -30dBFS PEAK
    Screenshot 2:
    Pink noise -20dBFS RMS
    PEAK Meter in Foobar vs your PEAK meter = different values
    The peak is currently just the absolute maximum sample per chunk. Each chunk size is determined by the number of FFT bins and the sample rate.

    Is there another definition?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-13 21:47:19
    Maybe it would be good to display Peak values besides the RMS values? Either momentary (those would change a lot) or the highest value that occured in the track (that would not change a lot and it would remain unchanged after the track reached its Peak Timstamp)?

    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-04-13 22:11:53
    I looked at the code. Analysis.cpp line 694 adds 3 dB to Peak value making it incorrect.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-14 07:24:10
    I looked at the code. Analysis.cpp line 694 adds 3 dB to Peak value making it incorrect.
    Not anymore.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-14 11:36:37
    How do I enable tooltips on this component's PeakMeters?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-04-14 11:41:57
    Not anymore.

    What do you mean? The source (https://github.com/stuerp/foo_vis_spectrum_analyzer/blob/master/Analyzers/Analysis.cpp#L694) still shows peak is divided by 1/sqrt(2) when converting the float to dB, which adds 3 dB to its value.

    I have trouble accepting the supposed "RMS+3" standard that makes RMS show nonsensical numbers, but if pro-people really need things to works that way I suppose I have to accept it. But for peaks this is 100% wrong thing to do.

    Getting off topic again, but I'd still like to see some specs explain where the idea came from to make RMS artifically match peaks. It's such a weird concept.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-14 12:11:11
    Not anymore.
    What do you mean? The source (https://github.com/stuerp/foo_vis_spectrum_analyzer/blob/master/Analyzers/Analysis.cpp#L694) still shows peak is divided by 1/sqrt(2) when converting the float to dB, which adds 3 dB to its value.
    I thought you meant the dBCorrection factor. That's gone.

    If the peak is not supposed to be corrected by 1/sqrt(2), I'll remove it.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: misio on 2024-04-14 13:08:04
    Getting off topic again, but I'd still like to see some specs explain where the idea came from to make RMS artifically match peaks. It's such a weird concept.
    No, it is not a weird idea.
    RMS+3 is used as standard RMS scale in every DAW, pro audio editor or stand alone meters like RTW. One can find it in DIGICheck by RME -> screenshot. Some VST plugins allow to chose the scale RMS/RMS+3

    There is a very interesting topic, where you can find a lot of info why RMS+3 is so commonly used:
    https://gearspace.com/board/mastering-forum/387136-i-need-correct-rms-meter.html
    Please pay attention to Bob Katz's posts.

    And maybe this help you more - AES17 / Standard method for digital audio engineering / Measurement of digital audio equipment:
    https://www.tc.faa.gov/its/worldpac/Standards/aes17.pdf

    Another off topic. Is it possible to fix built in Foobar RMS meter just to show values according to AES17 standard?




    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-14 17:04:21
    Not anymore.
    What do you mean? The source (https://github.com/stuerp/foo_vis_spectrum_analyzer/blob/master/Analyzers/Analysis.cpp#L694) still shows peak is divided by 1/sqrt(2) when converting the float to dB, which adds 3 dB to its value.
    I thought you meant the dBCorrection factor. That's gone.

    If the peak is not supposed to be corrected by 1/sqrt(2), I'll remove it.


    It seems that you already know what is causing the wrong Peak (not RMS) measurings. Please bring back the pre 0,7,5,3 version of Peaks (it was OK).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: kor5n on 2024-04-14 17:09:59
    Hello! I really like your work!
    I have several suggestions to improve the visual style of the indicator:
    1. Please add a separator between channels. I drew a rough picture of how I see it.
    2. The RMS level should be averaged not over time, but over the size of the FFT block. Let me explain:
    Averaging over time causes the peaks to twitch unnaturally, as if the computer is unable to render. When I set the block size to more than 16384 in the "Transform - Fourier Transform" settings, the RMS indicator move smoothly and beautifully. And also the current numerical value of RMS does not change so often, I have time to understand what is happening.
    Unfortunately, with this setting, the peak indicator also begins to “smooth out”, so I ask you to make this setting only for RMS.
    And one more thing: the maximum rendering speed is 63-64 frames per second with a monitor (and settings) limit of 100 ::)
    Sorry for the poor English, I try to express my thoughts as best as possible.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-04-14 17:33:51
    I had read that gearspace thread before, I think multiple times too. But I had not had the IEC 61606:1997 standard mentioned there until your links the other day. The IEC paper tells procedures how to measure analog devices, the AES17 paper tells how to measure digital equipment.

    Neither describe how to calibrate an RMS meter or what RMS meter should show. They specify how to measure the performance of the device and how to report the results. The AES paper says that if you use the measurement techniques from the paper you should mention that in the footnotes of the data.

    And the papers report terminology they use to describe the tests. That's very important so anyone testing things using these means can perform the tests identically.
    These papers don't say anywhere that the 997 Hz full scale sine wave should be reported as having RMS of 0 db FS.

    What they do tell you to do is to use the 997 Hz sine as reference level against which to report the dB differences in some of the tests.

    Basically the reason RMS meters should lie and show 3 dB more is because Bob Katz says that's how all ancient RMS meters worked. I can't find any historical evidence to suggest that to be true. Here's for example some very ancient RMS meter that clearly doesn't match 0 dB RMS to 1 volt: https://i.ebayimg.com/images/g/4vEAAOSwh5ViDSJT/s-l1600.jpg (https://i.ebayimg.com/images/g/4vEAAOSwh5ViDSJT/s-l1600.jpg)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-14 17:45:29
    Hello! I really like your work!
    Thx
    1. Please add a separator between channels. I drew a rough picture of how I see it.
    There's a 1 pixel gap between the bars. You want it bigger?
    2. The RMS level should be averaged not over time, but over the size of the FFT block. Let me explain:
    Averaging over time causes the peaks to twitch unnaturally, as if the computer is unable to render. When I set the block size to more than 16384 in the "Transform - Fourier Transform" settings, the RMS indicator move smoothly and beautifully. And also the current numerical value of RMS does not change so often, I have time to understand what is happening.
    Unfortunately, with this setting, the peak indicator also begins to “smooth out”, so I ask you to make this setting only for RMS.
    There's an RMS window setting that goes up to 5 seconds to smooth the RMS calculation independent of the chunk size.
    And one more thing: the maximum rendering speed is 63-64 frames per second with a monitor (and settings) limit of 100 ::)
    Another user in the thread has no problem with it even though I did not change anything. Could it be a GPU driver setting?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: misio on 2024-04-14 18:39:14
    I had read that gearspace thread before...
    There is a lot of info on internet about RMS+3 AES17 standard.
    https://gearspace.com/board/mastering-forum/358907-s-aes17-not.html
    https://www.soundonsound.com/forum/viewtopic.php?t=56155
    https://discourse.ardour.org/t/calculating-rms-in-digital-audio/109812?page=2
    But if you do not agree with the AES17 you can make a petition to the Audio Engineering Society to change the standard.
    Do not forget to sent a mail to Steinberg (and also to other companies) to change theirs meters in Nuendo DAW  ;D
    https://steinberg.help/nuendo/v8/en/cubase_nuendo/topics/loudness/loudness_master_meter_r.html
    Title: Re: foo_vis_spectrum_analyzer
    Post by: kor5n on 2024-04-14 18:42:11
    There's a 1 pixel gap between the bars. You want it bigger?
    Yes! I don't see him. And on the Spectrum it is clearly visible.
    There's an RMS window setting that goes up to 5 seconds to smooth the RMS calculation independent of the chunk size.
    Unfortunately, this is not at all what I expect to see... Please see how your setting is applied in comparison with what I want to get in the end. (https://drive.google.com/file/d/1aJ4AkajJjS7rkbHYmTwwlaK1SXF1Z2iK/view?usp=sharing)
    Perhaps I'm thinking incorrectly. Or I turn on the wrong setting.
    Sorry if Google Drive links are not allowed.
    Another user in the thread has no problem with it even though I did not change anything. Could it be a GPU driver setting?
    I have an Intel Arc video accelerator, you can expect anything from it. All graphics applications on the system are allowed maximum performance. To be fair, on the AMD Radeon R9 390X the module behaves similarly.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-14 18:47:06
    1. Please add a separator between channels. I drew a rough picture of how I see it.
    There's a 1 pixel gap between the bars. You want it bigger?

    In the current version 0.7.5.4 there sometimes is no gap at all. Maybe he had that situation, since Kor5n said he draw a picture with a gap.

    Might be a good idea to make the interbar gap configurable.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-14 20:33:56
    There's a 1 pixel gap between the bars. You want it bigger?
    Yes! I don't see him. And on the Spectrum it is clearly visible.
    I cleaned up the calculations in the next version to better handle edge cases. Maybe I'll make the gap configurable.

    There's an RMS window setting that goes up to 5 seconds to smooth the RMS calculation independent of the chunk size.
    Unfortunately, this is not at all what I expect to see... Please see how your setting is applied in comparison with what I want to get in the end. (https://drive.google.com/file/d/1aJ4AkajJjS7rkbHYmTwwlaK1SXF1Z2iK/view?usp=sharing)
    Perhaps I'm thinking incorrectly. Or I turn on the wrong setting.
    Sorry if Google Drive links are not allowed.
    Which smoothing method do you use? ("Common" page). It should be set to "Average" to reduce jitter.

    Another user in the thread has no problem with it even though I did not change anything. Could it be a GPU driver setting?
    I have an Intel Arc video accelerator, you can expect anything from it. All graphics applications on the system are allowed maximum performance. To be fair, on the AMD Radeon R9 390X the module behaves similarly.
    It has nothing to do with the performance of the GPU. Direct2D uses a buffer swap chain that is usually synced to the refresh rate of the monitor. In D2D I don't know of a setting to influence that.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: kor5n on 2024-04-14 21:07:04
    Which smoothing method do you use? ("Common" page). It should be set to "Average" to reduce jitter.
    "Average" = 0.2. I have this setting on all modules. Increasing this parameter, of course, smooths out the RMS indicator, but reduces the jump of peaks. I consider this value is optimal.
    It has nothing to do with the performance of the GPU. Direct2D uses a buffer swap chain that is usually synced to the refresh rate of the monitor. In D2D I don't know of a setting to influence that.
    The following plugins are always active on my screen: Waveform Minibar (mod) 1.2.58 and Oscilloscope (Direct2D) 1.1.0. The first has an update rate of 60 frames per second, the second - 100. Closing these plugins doesn't solve the problem. Maybe they should be unloaded? (i.e. delete?)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: darkflame23 on 2024-04-15 06:43:56
    I seem to remember the only difference between "mathematical" and "AES" RMS is 3dB, due to whether you reference a sine wave or a square wave. At the end of the day it's not very important/easy to add or subtract 3dB in one's head. The best pro meters are set for +3/AES by default, or allow you to choose.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-15 13:14:42
    The wiki (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Spectrum_Analyzer_(foo_vis_spectrum_analyzer)) has been updated to provide a little more explanation about the various settings.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-04-16 03:04:23
    The wiki (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Spectrum_Analyzer_(foo_vis_spectrum_analyzer)) has been updated to provide a little more explanation about the various settings.
    Also, don't forget about the images of what settings actually do (e.g. switching from FFT to IIR filter bank changes the shape of the spectrum response)

    BTW, as the wiki is editable by everyone (not just you), these changes (necessary updates) to this wiki page shouldn't be listed on changelogs in this GitHub page (https://github.com/stuerp/foo_vis_spectrum_analyzer) nor this component repository page (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-16 18:06:12
    v0.7.6.0, 2024-04-16

    * Peak Meter
      * Changed: Removed the 3.01 dB from the peak value.
      * Added: Option to allow the user to get readings compliant with IEC 61606:1997 / AES17-1998 standard (RMS +3).
      * Changed: Tweaked the coordinate calculations a bit to produce a more polished result.
      * Added: The gap between the gauges can be configured.
    * Improved: The context menu will put a checkmark next to the last selected preset.

    You can download it from the Component (https://www.foobar2000.org/components/view/foo_vis_spectrum_analyzer) repository or from GitHub (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.7.6.0).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-04-16 20:07:57
    Feature request for Peakmeter part (and to the extent, spectrum/spectrogram visualization): A feature to display Mid/Side representations of all stereo/surround pairs like this (https://codepen.io/TF3RDL/pen/gOdWmVN)

    This can be useful for letting me know if the particular song have phase-related/mono-compatibility issues, even though foobar2000 is not a DAW obviously
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-04-17 07:59:07
    There's some confusion with the settings in v0.7.6.0. Peak is now right as you don't do any extra calculations to it.
    But RMS is incorrect. You always divide the real RMS value by 'Amax', which is the same as adding 3 dB to its value. Then in addition you offer an optional 3 dB addition to it.

    Also the peak visualization bars go hidden here half the time (I have them moving horizontally from left to right). When I was playing stereo file, the right channel bar went invisible. I had to tweak the height of the UI element to make it visible. Then I played a mono file and now the size was incorrect for that size and it's invisible.
    I don't think the bars should go invisible under any circumstances.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-17 09:03:28
    There's some confusion with the settings in v0.7.6.0. Peak is now right as you don't do any extra calculations to it.
    But RMS is incorrect. You always divide the real RMS value by 'Amax', which is the same as adding 3 dB to its value. Then in addition you offer an optional 3 dB addition to it.
    I just followed the article I quoted earlier. Like I said many times before: I'm not an audio engineer and don't understand this stuff half of the time. But when the specs are this confusing and 'people in the know' are debating definitions I prefer to stand by the sideline until the dust is cleared and a clear spec becomes available.

    Edit: The current code produces correct(?) results with all the files I found here (https://www.soundonsound.com/techniques/sos-audio-test-files) and here (https://www2.iis.fraunhofer.de/AAC/multichannel.html).
    Also the peak visualization bars go hidden here half the time (I have them moving horizontally from left to right). When I was playing stereo file, the right channel bar went invisible. I had to tweak the height of the UI element to make it visible. Then I played a mono file and now the size was incorrect for that size and it's invisible.
    I don't think the bars should go invisible under any circumstances.
    It's a render bug caused by Direct2D or the driver. I thought I had solved it with the optimized calculations because I could no longer reproduce the bug here (after updating the GPU driver). It has to do with drawing the LED bitmap on odd coordinates. The filled rectangles don't have this problem, AFAIK.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-17 10:21:13
    Also the peak visualization bars go hidden here half the time (I have them moving horizontally from left to right). When I was playing stereo file, the right channel bar went invisible. I had to tweak the height of the UI element to make it visible. Then I played a mono file and now the size was incorrect for that size and it's invisible.
    I don't think the bars should go invisible under any circumstances.
    It's a render bug caused by Direct2D or the driver. I thought I had solved it with the optimized calculations because I could no longer reproduce the bug here (after updating the GPU driver). It has to do with drawing the LED bitmap on odd coordinates. The filled rectangles don't have this problem, AFAIK.

    I did a lot of testing this.

    Horizontal peakmeter has this issue only for the bottom bar. Vertical peakmeter has the same issue for the left bar.

    As you said ... does not happen when using gradient (eg no leds). Also does not happen when you display both legends on top and bottom of horizontal peakmeter (or to the left and right of vertical peakmeter).
    So the issue is only when having 0 or 1 legend along the bar and you are using leds.

    When this bar disappears the the Peak indicator for this disappeared bar is still shown correctly .

    Easy to reproduce. Take a mono source or apply a DSP downmix to 1.0. Use only one legend on a horizontal peakmeter that has
    LED mode enabled (add Peak indicator for reference).

    If you allot a panel with a height of anything within 42 and 54 pixel's you will not see the mono bar at all, but you will see the Peakmeter indicator.

    So you simply cannot display a mono channel PeakMeter using LED's and one legend.

    The moment you change to gradients instead LEDS or display the second legend the PeakMeter appears.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-04-17 10:29:06
    The Amax in the skippystudio explanation refers to maximum amplitude of the signal, which is 1.0. Their graph (https://skippystudio.nl/wp-content/uploads/2021/07/RMS-vs-average.png) also perfectly shows that real RMS can't be as high as peaks.
    So remove the division by Amax and things will be correct. Real RMS shows correct RMS, and the checkbox enables the 'RMS+3' mode.

    I never saw disappearing bars with the old release.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-17 10:38:34
    Like Case I also have been experimenting with varying the height of the panel that the horizontal LED Peakmeter lives in.

    I use two different presets with the horizontal Peakmeter: No legend and 1 Legend (2 Legends simply takes too much space).

    You cannot find a panel height that displays both presets correctly in case of 3 channel and 5 channel sources (or upmixes to 3 / 5 channels).

    EDIT: By varying the panel height you can find optimums for 2ch, 4ch, 6ch and 8ch.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-17 12:26:14
    The Amax in the skippystudio explanation refers to maximum amplitude of the signal, which is 1.0. Their graph (https://skippystudio.nl/wp-content/uploads/2021/07/RMS-vs-average.png) also perfectly shows that real RMS can't be as high as peaks.
    So remove the division by Amax and things will be correct. Real RMS shows correct RMS, and the checkbox enables the 'RMS+3' mode.
    Sorry @case but I'm not going to take your word for it. Removing the division causes all the test files from SOS to have a dBFS reading that is 3dB higher than their expected result. Even the tone://997 reference is wrong.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-17 12:56:36
    Like Case I also have been experimenting with varying the height of the panel that the horizontal LED Peakmeter lives in.

    I use two different presets with the horizontal Peakmeter: No legend and 1 Legend (2 Legends simply takes too much space).

    You cannot find a panel height that displays both presets correctly in case of 3 channel and 5 channel sources (or upmixes to 3 / 5 channels).

    EDIT: By varying the panel height you can find optimums for 2ch, 4ch, 6ch and 8ch.
    I found a work-around by creating a bitmap that is larger than it should be (according to the documentation) and release a hotfix when it has been tested.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-17 13:12:42
    Since we now have the ability to see "RMS" as text maybe it would be useful to also see "Peaks" as text. And to go further also "Peaks - RMS" - but what would that value be "equivalent" (sort of) of: momentary/short term DR (from the infamous plugin), momentary/short term PLR/PSR, momentary/short term LUFS, momentary/short term LRA or something else?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-17 14:26:42
    but what would that value be "equivalent" (sort of) of: momentary/short term DR (from the infamous plugin), momentary/short term PLR/PSR, momentary/short term LUFS, momentary/short term LRA or something else?
    I don't know what those readings are. Can you point me to some documentation or specs?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-04-17 14:31:37
    Sorry @case but I'm not going to take your word for it. Removing the division causes all the test files from SOS to have a dBFS reading that is 3dB higher than their expected result. Even the tone://997 reference is wrong.
    It's not my word, that's the very definition of RMS: https://en.wikipedia.org/wiki/Root_mean_square#Definition (https://en.wikipedia.org/wiki/Root_mean_square#Definition).
    You calculate the sum of values squared, divide by the number of values and take square root of that.
    And removing the last division does not increase the result, I don't understand why you claim that. It causes the file labeled -20 dB to show -23 dB RMS, or -20 dB with the +3 mode enabled. And tone:// test is -3.0 dB / 0.0 dB.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-17 14:37:42
    Since we now have the ability to see "RMS" as text maybe it would be useful to also see "Peaks" as text. And to go further also "Peaks - RMS" - but what would that value be "equivalent" (sort of) of: momentary/short term DR (from the infamous plugin), momentary/short term PLR/PSR, momentary/short term LUFS, momentary/short term LRA or something else?

    Isn't that already available in the modern Loudness Peakmeter plugin?

    https://hydrogenaud.io/index.php/topic,123953.msg1027603.html#msg1027603


    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-17 15:03:30
    Since we now have the ability to see "RMS" as text maybe it would be useful to also see "Peaks" as text. And to go further also "Peaks - RMS" - but what would that value be "equivalent" (sort of) of: momentary/short term DR (from the infamous plugin), momentary/short term PLR/PSR, momentary/short term LUFS, momentary/short term LRA or something else?

    Isn't that already available in the modern Loudness Peakmeter plugin?

    https://hydrogenaud.io/index.php/topic,123953.msg1027603.html#msg1027603




    It is there but Peak Meter (from vis...plugin) comsumes less power and is smaller on the screen and does not require the whole drawing of those readings.
    Istead what we already have is graphic Peak (which I started to use instead of a built-in one), graphic RMS (which is VU meter if I understood your earlier discussion properly), text RMS (inside the graphic RMS) so I thought that it should be easy to also display the text version of Peak inside the graph (let's say beside the text RMS values). And if we have those two it should be easy to display the difference between them (but because I am not an expert I am not shure what value would it represent (LUFS/PLR (or rather PSR)/LRS/DR or something different). Just a suggestion - we would not have to use two components but one.

    @pqyt - as for specs and documentation - I am sorry but someone with more knowledge that I have should help here. All Iknow comes from Wiki and other such places.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-17 15:39:45
    Sorry @case but I'm not going to take your word for it. Removing the division causes all the test files from SOS to have a dBFS reading that is 3dB higher than their expected result. Even the tone://997 reference is wrong.
    It's not my word, that's the very definition of RMS: https://en.wikipedia.org/wiki/Root_mean_square#Definition (https://en.wikipedia.org/wiki/Root_mean_square#Definition).
    You calculate the sum of values squared, divide by the number of values and take square root of that.
    And removing the last division does not increase the result, I don't understand why you claim that. It causes the file labeled -20 dB to show -23 dB RMS, or -20 dB with the +3 mode enabled. And tone:// test is -3.0 dB / 0.0 dB.
    Again, I'm not an expert but isn't the confusion centered around dB and dbFS? Also, the mathematical RMS definition seems to get obfuscated by the audio world understanding of RMS.

    If tone://997 is a pure 997Hz sine wave that is used as reference point of dBFS (the zero point), then shouldn't that show up with a 0 *dBFS* reading?

    If a test file is published as -20dbFS, shouldn't that be rendered at -20dBFS?

    If you want a *dB* reading and rendering, activate the RMS+3 toggle.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-17 15:46:00
    Since we now have the ability to see "RMS" as text maybe it would be useful to also see "Peaks" as text. And to go further also "Peaks - RMS" - but what would that value be "equivalent" (sort of) of: momentary/short term DR (from the infamous plugin), momentary/short term PLR/PSR, momentary/short term LUFS, momentary/short term LRA or something else?
    Isn't that already available in the modern Loudness Peakmeter plugin?

    https://hydrogenaud.io/index.php/topic,123953.msg1027603.html#msg1027603
    I thought that it should be easy to also display the text version of Peak inside the graph (let's say beside the text RMS values)
    I'm not a fan of that because it will cause too much text to be drawn over the gauge. The current position of the text was decided by my laziness to write the code to give it it's own client area.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-17 16:24:19
    Since we now have the ability to see "RMS" as text maybe it would be useful to also see "Peaks" as text. And to go further also "Peaks - RMS" - but what would that value be "equivalent" (sort of) of: momentary/short term DR (from the infamous plugin), momentary/short term PLR/PSR, momentary/short term LUFS, momentary/short term LRA or something else?
    Isn't that already available in the modern Loudness Peakmeter plugin?

    https://hydrogenaud.io/index.php/topic,123953.msg1027603.html#msg1027603
    I thought that it should be easy to also display the text version of Peak inside the graph (let's say beside the text RMS values)
    I'm not a fan of that because it will cause too much text to be drawn over the gauge. The current position of the text was decided by my laziness to write the code to give it it's own client area.

    Yes - too much text could be "annoying/ugly" but if there was an option to not display any text or only RMS or only Peak or both that would be users decision.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-04-17 16:32:56
    If tone://997 is a pure 997Hz sine wave that is used as reference point of dBFS (the zero point), then shouldn't that show up with a 0 *dBFS* reading?
    In that reference, sure. In the so called RMS+3 scale.

    If a test file is published as -20dbFS, shouldn't that be rendered at -20dBFS?
    Depends who published it and what it's meant to show. For example the sine waves from soundonsound have peaks at -20 dBFS so showing peaks at -20 dBFS is very valid. True RMS for such sine is 3 dB lower, -23 dB, 'RMS+3' display would be -20 dB.

    If you want a *dB* reading and rendering, activate the RMS+3 toggle.
    When the toggle is off, you show 'RMS+3' values. When it's enabled you show RMS+3+3 dB. And adding the FS for full scale is just an accuracy increase, because dB alone doesn't tell what it is relative to. All values are of course relative to the digital full scale.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-17 17:07:25
    If a test file is published as -20dbFS, shouldn't that be rendered at -20dBFS?
    Depends who published it and what it's meant to show. For example the sine waves from soundonsound have peaks at -20 dBFS so showing peaks at -20 dBFS is very valid. True RMS for such sine is 3 dB lower, -23 dB, 'RMS+3' display would be -20 dB.
    (https://dt7v1i9vyp3mf.cloudfront.net/styles/header/s3/imagelibrary/s/sos_test_tones_04_fig_3-VPB3yHCD8Q7sZev4NTQNQWRP0yOjEvfr.jpg)
    If you want a *dB* reading and rendering, activate the RMS+3 toggle.
    When the toggle is off, you show 'RMS+3' values. When it's enabled you show RMS+3+3 dB. And adding the FS for full scale is just an accuracy increase, because dB alone doesn't tell what it is relative to. All values are of course relative to the digital full scale.
    I have no new arguments and you still haven't convinced me. Maybe @misio can shed some light on the situation. He/She has been pushing me in the other direction. I don't care either way. But I can't follow 2 different expert opinions at the same time.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-17 17:36:25
    Happy to say I'm not an expert.

    I'm foremost interested in being able to discard the old Peakmeter Spectrum. For that I prefer this tool to mimic behavior of the old plugin. Old plugin shows 3dB less than this one (even with the +3dB disabled). So please implement it the same way or just make an extra tickbox in the configuration to do enable -3dB in order to mimic the old tool.

    The old plugin has tooltips that show Peak MAX and RMS max. Can you enable those as well?

    Maybe an idea to (optionally) also show LRA (or LUFS/PLR) whatever in the same tooltip. That way the user interface does not get cluttered.

    Last point ... until now every version creates a hard crash to the desktop without logging when I accidentally Toggle full screen mode.
    I don't care much if this will be solved, but please make it configurable not to show the Toggle Fullscreen on rightmouseclick.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-17 17:40:43
    Ha, disappearing bottom bar seems to be fixed in 0.7.6.1 :-)

    EDIT: Tested all combinations in channel based heights displaying anything between down/upmixed 1ch to 8ch. All good in preset without legend and preset with 1 legend. Thx.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-17 17:57:27
    I'm foremost interested in being able to discard the old Peakmeter Spectrum. For that I prefer this tool to mimic behavior of the old plugin. Old plugin shows 3dB less than this one (even with the +3dB disabled). So please implement it the same way or just make an extra tickbox in the configuration to do enable -3dB in order to mimic the old tool.
    Have you considered the old Peakmeter was wrong?

    The old plugin has tooltips that show Peak MAX and RMS max. Can you enable those as well?
    I put it on the list.

    Last point ... until now every version creates a hard crash to the desktop without logging when I accidentally Toggle full screen mode.
    I don't care much if this will be solved, but please make it configurable not to show the Toggle Fullscreen on rightmouseclick.
    No x64/x86/CUI/DUI crashes here.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: JesalRo on 2024-04-17 18:21:26
    Hello pqyt
    I have detected an anomaly in the latest version. If you enable Leds in Peak Meter mode (Image1) and mark Left and Right (Image2) it does it correctly, but if you disable Left and Right (Image3) only the Left channel is displayed. In the previous version it did it correctly.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-17 18:53:51
    Have you considered the old Peakmeter was wrong?

    Of course. But the value of the old Peakmeter Spectrum (easy to check in the tooltip) is exactly the same as the one from the modern Loudness Peakmeter plugin.

    Last point ... until now every version creates a hard crash to the desktop without logging when I accidentally Toggle full screen mode.
    I don't care much if this will be solved, but please make it configurable not to show the Toggle Fullscreen on rightmouseclick.
    No x64/x86/CUI/DUI crashes here.

    I thought it would have something to do with foo_ui_hacks but that is not the case. Only thing that's probably different in my CUI/x86 is the fact I use transparency. I tested by disabling transparency on the panel that your  plugin(s) live in, but that did not help.
    Disabling transparency on all panels that depend on it for a small test is just way too much work (all SMP panels and all splitters and a lot of plugins that support it have transparency enabled).
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-17 18:56:01

    I have no new arguments and you still haven't convinced me. Maybe @misio can shed some light on the situation. He/She has been pushing me in the other direction. I don't care either way. But I can't follow 2 different expert opinions at the same time.

    Consider me no expert - I just judge those readings by eye/ear and in comparison to other known (established?) meters. For ex. if I measured the files (with RG) and they say they have peak (true-peak) at -0,5 and your plugin and other "similar" plugins say that it is more or less -0,5 - I'm happy. There were two previous version of this plugin that said it was 2,5 (by eye) so it was different than RG and every other player plus those files did not clip (I suppose they should with peaks at 2,5). So I reported that your peaks were to high. Now they look OK to me.

    As for RMS - I just made a live comparison of readings while playing a track and it was like that:
    - your component with +3 disabled showed the same values as VST TT Dynamic Range Meter and the same as VST dpMeter5 and the same as VST Span (that one with DBFS+3 set). If I  changed Span to DBFS (without +3) it showed 3 more than all the others (inluding yours which was with +3 disabled). So it seems (again judging by eye) that your RMS set to 0 shows what other show and when set to +3 it shows different values than others.

    So to me (as an amateur) it seems that Peaks now are OK and RMS might be too high by 3. Or in other word: to make all those 4 meters show the same values I have to set yours to 0 (+3 disabled) and Span to DBFS+3. Other two do not have those options to change but show the same values.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-17 19:13:55
    As for RMS - I just made a live comparison of readings while playing a track and it was like that:
    - your component with +3 disabled showed the same values as VST TT Dynamic Range Meter and the same as VST dpMeter5 and the same as VST Span (that one with DBFS+3 set). If I  changed Span to DBFS (without +3) it showed 3 more than all the others (inluding yours which was with +3 disabled). So it seems (again judging by eye) that your RMS set to 0 shows what other show and when set to +3 it shows different values than others.

    So to me (as an amateur) it seems that Peaks now are OK and RMS might be too high by 3. Or in other word: to make all those 4 meters show the same values I have to set yours to 0 (+3 disabled) and Span to DBFS+3. Other two do not have those options to change but show the same values.
    @wojak, would you please download one of the test files from https://www.soundonsound.com/techniques/sos-audio-test-files, preferably one with a dBFS number on the file name (e.g. 1_mono tone 1kHz -20dBFS 44k.wav or 19_Pink Noise stereo 20Hz_20kHz -23dBFS 44k.wav) and let us know what readings you get with other plugins?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-17 19:55:55
    As for RMS - I just made a live comparison of readings while playing a track and it was like that:
    - your component with +3 disabled showed the same values as VST TT Dynamic Range Meter and the same as VST dpMeter5 and the same as VST Span (that one with DBFS+3 set). If I  changed Span to DBFS (without +3) it showed 3 more than all the others (inluding yours which was with +3 disabled). So it seems (again judging by eye) that your RMS set to 0 shows what other show and when set to +3 it shows different values than others.

    So to me (as an amateur) it seems that Peaks now are OK and RMS might be too high by 3. Or in other word: to make all those 4 meters show the same values I have to set yours to 0 (+3 disabled) and Span to DBFS+3. Other two do not have those options to change but show the same values.
    @wojak, would you please download one of the test files from https://www.soundonsound.com/techniques/sos-audio-test-files, preferably one with a dBFS number on the file name (e.g. 1_mono tone 1kHz -20dBFS 44k.wav or 19_Pink Noise stereo 20Hz_20kHz -23dBFS 44k.wav) and let us know what readings you get with other plugins?

    1_mono tone 1kHz -20dBFS 44k.wav:
    - your component at 0: 20/20 (RMS/PEAK)
    - your component at +3: 17/17
    - vst TT Dynamic Range Meter: 20/20
    - Span at DBFS: 23/20
    - Span at DBFS+3: 20/20
    - dpMeter: 23/20
    - youlean loudness meter: 23/20

    So it seems that RMS should be as @Case said - lower by 3 (or third option: -3).
    Peak seem OK but one strange thing that your component also shows 17 as peak when +3 while all others show 20 no matter if +3 or not.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-17 20:25:35
    As for RMS - I just made a live comparison of readings while playing a track and it was like that:
    - your component with +3 disabled showed the same values as VST TT Dynamic Range Meter and the same as VST dpMeter5 and the same as VST Span (that one with DBFS+3 set). If I  changed Span to DBFS (without +3) it showed 3 more than all the others (inluding yours which was with +3 disabled). So it seems (again judging by eye) that your RMS set to 0 shows what other show and when set to +3 it shows different values than others.

    So to me (as an amateur) it seems that Peaks now are OK and RMS might be too high by 3. Or in other word: to make all those 4 meters show the same values I have to set yours to 0 (+3 disabled) and Span to DBFS+3. Other two do not have those options to change but show the same values.
    @wojak, would you please download one of the test files from https://www.soundonsound.com/techniques/sos-audio-test-files, preferably one with a dBFS number on the file name (e.g. 1_mono tone 1kHz -20dBFS 44k.wav or 19_Pink Noise stereo 20Hz_20kHz -23dBFS 44k.wav) and let us know what readings you get with other plugins?

    1_mono tone 1kHz -20dBFS 44k.wav:
    - your component at 0: 20/20 (RMS/PEAK)
    - your component at +3: 17/17
    - vst TT Dynamic Range Meter: 20/20
    - Span at DBFS: 23/20
    - Span at DBFS+3: 20/20
    - dpMeter: 23/20
    - youlean loudness meter: 23/20

    So it seems that RMS should be as @Case said - lower by 3 (or third option: -3).
    Peak seem OK but one strange thing that your component also shows 17 as peak when +3 while all others show 20 no matter if +3 or not.
    OK. I fold. ;-)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: wojak on 2024-04-17 20:40:06
    But the Peaks seem OK to me (by eye), those also seemed OK from the beginning. Only two or three version from a few days ago seemed wrong and now it seems OK again with music (and weird with this one test file but only with +3 which should not change peaks as it is supposed to recalibrate RMS only).

    I again propose to implement text peak values as it would make the comparison with other meters easier. Other meter usually show the max value of the track up to the present point (the highest value reached from the beginning of the track to "now") and not the actual momentary value.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-17 20:42:30
    But the Peaks seem OK to me (by eye), those also seemed OK from the beginning. Only two or three version from a few days ago seemed wrong and now it seems OK again with music (and weird with this one test file but only with +3 which should not change peaks as it is supposed to recalibrate RMS only).

    I again propose to implement text peak values as it would make the comparison with other meters easier. Other meter usually show the max value of the track up to the present point (the highest value reached from the beginning of the track to "now") and not the actual momentary value.
    See the screenshots from the quick hack above. I never expected this to be more difficult than the curve representation of the spectrum...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-17 20:44:56
    Hello pqyt
    I have detected an anomaly in the latest version. If you enable Leds in Peak Meter mode (Image1) and mark Left and Right (Image2) it does it correctly, but if you disable Left and Right (Image3) only the Left channel is displayed. In the previous version it did it correctly.

    Apparently you missed this message:
    https://hydrogenaud.io/index.php/topic,125031.msg1043133.html#msg1043133

    Just download and install the newest version 0.7.6.1.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: JesalRo on 2024-04-18 01:11:15
    Ok
    Thank you
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-04-18 20:19:47
    I just let Foobar v2.2 x64 and 1.6.17 both update from version 0751 to 0762 of Spectrum Analyzer, and while I only use the spectrum bars format I find its display is now the best to date.  FWIW, the only non-identical adjustments I have between the two Foobars is that in v2.2 for Common I use smoothing method Peak/.9 and in 1.6.17 I use Average/.3.

    Great work on 0762, pqyt!
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-18 20:47:30
    Great work on 0762, pqyt!
    Thx. I appreciate it.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-04-18 23:53:03
    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 (https://codepen.io/TF3RDL/pen/poQJwRW) 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 (https://codepen.io/TF3RDL/pen/poQJwRW), but also another one (https://codepen.io/TF3RDL/pen/MWLzPoO)) 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):
    X
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Fabcore on 2024-04-19 00:43:39
    Hi, I got a crash while adjusting this parameter to the extreme high

    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-04-19 01:20:20
    Hi, I got a crash while adjusting this parameter to the extreme high
    Not trying to be "smart" but if you play with putting wild settings in the parameters you can crash almost anything.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-19 05:40:48
    Hi, I got a crash while adjusting this parameter to the extreme high
    @Fabcore , that's not extreme high. Can you attach a preset that causes a crash? Also, which version of the component are you using?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-04-19 06:39:22
    Not trying to be "smart" but if you play with putting wild settings in the parameters you can crash almost anything.
    I'd say valid reason to crash because of "wild" settings is very rare. Running out of memory can potentially be an ok reason to crash, but for a normal PC that would usually require allowing the user to do something totally insane. For example if the component allowed user to scale the background image to something requiring gigabytes of memory to store, allocating the memory for that would most likely fail. If such allocation fails the component could quietly disable the album art, show an error, or crash. It all depends on how or if the programmer decides to handle errors.
    I'd also call it a bug if a component allows selecting settings it can't handle.

    I'm not claiming foo_vis_spectrum_analyzer does anything wrong, just commenting generally about your statement.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: sveakul on 2024-04-19 07:43:44
    Hi, I got a crash while adjusting this parameter to the extreme high
    @Fabcore , that's not extreme high. Can you attach a preset that causes a crash? Also, which version of the component are you using?
    I realize that the value he had in the screenshot is not "extreme"--heck mine is higher--but he referred to the "parameter" itself so I don't know what he had been inserting there that provoked the post.

    Case, point taken, and Fabcore, no accusation intended, but I just get peeved when I get the impression that a brilliantly performing app is just getting poked to death by attempts to "let's see what way-off entry can make it misbehave."
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-19 14:11:34
    @pqyt

    First of all thank you for this excellent tool. I can (almost) get rid of 18 instances of PeakMeter Spectrum by substituting them with 6 instances of yours.
     
    Since peakmeter is working perfectly in 100% windows scaling, I moved on to testing this plugins behavior with different windows scaling and encountered problems in all scaling (except 200% and 300%). Happens both in horizontal and vertical peakmeters. The rest of this message will only address the vertical peakmeter (without axe legends).

    See the attached jpg's that also displays some debug information. I also included the code I use to determine the panel width for the number of channels and windows scaling.

    The following text looks quite complicated but is more easy if you look at the jpg.
    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.

    In the attached jpg I included my scaled total gauge gap is 14 and I'm pretty sure you use 15.75 either truncated to 15 or rounded up to 16. Which leads to the behavior I described above.

    Code: [Select]
    // UNSCALED
    $ifgreater($get(channels),7, $puts(px.h_bar, 13), // 13 max to display Above logo with Top plugin disabled
    $ifgreater($get(channels),5, $puts(px.h_bar, 13), // 13 max to display Above logo with Top plugin enabled
    $ifgreater($get(channels),4, $puts(px.h_bar, 14), // 15 max to display Above logo with Top plugin enabled
    $ifgreater($get(channels),3, $puts(px.h_bar, 16), // 20 max to display Above logo with Top plugin enabled
    $ifgreater($get(channels),2, $puts(px.h_bar, 21), // 27 max to display Above logo with Top plugin enabled
    $ifgreater($get(channels),1, $puts(px.h_bar, 21), // 41 max to display Above logo with Top plugin enabled
    $puts(px.h_bar, 32) // 83 max to display Above logo with Top plugin enabled
    ))))))

    $puts(mx.w_bar,         6) // Unscaled - Single bar width - Desired unscaled bar width for PeakMeter vertical

    $puts(wh_gauge_s,       1) // Unscaled - Single gauge gap - Desired unscaled gauge gap
    $puts(wh_gauge_t,       $mul($sub($get(channels),1),$get(wh_gauge_s))) // Unscaled - Total  gauge gap

    $puts(px.h_std,         $add($get(wh_gauge_t), $mul($get(px.h_bar),$get(channels)))) // Unscaled - Panel height needed - PeakMeter horizontal
    $puts(mx.w_std,         $add($get(wh_gauge_t), $mul($get(mx.w_bar),$get(channels)))) // Unscaled - Panel width  needed - PeakMeter vertical


    // SCALED
    $puts(wh_gauge_s,       $muldiv($get(wh_gauge_s),%scale%,100)) // Scaled - Single gauge gap - truncated
    $puts(wh_gauge_t,       $mul($sub($get(channels),1),$get(wh_gauge_s))) // - Total  gauge gap - calculation based on truncated scaled single gauge gap / NOT BASED BY SCALING UNSCALED TOTAL GAUGE GAP

    $puts(px.h_bar,         $muldiv($get(px.h_bar),%scale%,100)) // Scaled - Single bar height - truncated - PeakMeter horizontal
    $puts(mx.w_bar,         $muldiv($get(mx.w_bar),%scale%,100)) // Scaled - Single bar width - truncated - PeakMeter vertical

    $puts(px.h_std,         $add($get(wh_gauge_t), $mul($get(px.h_bar),$get(channels)))) // Scaled - Panel height needed - PeakMeter horizontal - calculation based on truncated scaled single bar height / NOT BASED BY SCALING UNSCALED TOTAL BAR HEIGHT
    $puts(mx.w_std,         $add($get(wh_gauge_t), $mul($get(mx.w_bar),$get(channels)))) // Scaled - Panel width  needed - PeakMeter vertical - calculation based on truncated scaled single bar width / NOT BASED BY SCALING UNSCALED TOTAL BAR WIDTH


    In my opinion calculation should be as follows:
    1) Scale the single gauge gap and store the result truncated in an integer.
    2) Calculate total gauge gap by multiplying the value of 1) times the number of (channels minus 1)
    3) Deduct from the panel width the value of 2) and width needed for 1/2 axe legends
    4) Divide the value of 3) by the number of channels and store the result truncated in an integer (barwidth per bar)
    5) ... continued with total leftover pixels and distribution to the left & right of the panel

    I think the issue lies in 1) and 2). In my code it is the two lines under // SCALED.

    Please investigate ...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-04-19 18:15:16
    @pqyt

    When you use a horizontal peakmeter (in 100% scaling) alignment is perfect if you do not use a legend on top or bottom. The topmost bar will align with the top of the panel and the bottom bar will align with the bottom of the panel when panel height is allotted by me calculated by channels x barheight + gauge size x (channels-1).

    The moment I display 1 or 2 horizontal legends the bottom bar does not align anymore with the bottom of the window you paint in the panel I allotted. There is always a gap of 2 pixels between the bottom of the bar and the bottom of the window you paint (left side legend displays channels in full panel height). The same gap is on top, but that one is not noticed that much because the legend is on top of it.

    As a result I cannot align the bottom of the bottombar with all other plugins I display. I cannot compensate for this behavior since 1) I do not know if a legend is displayed and 2) even if I lower the panel by 2 pixels that would still not align since in that case the left legend would be displayed too low.

    Can you please change this behavior and use the 2 pixels below bottombar and 2 pixels above topbar (and under top legend) for bar display (there's still plenty of space to the legend on top of the topbar)?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: fogna80 on 2024-04-19 22:30:14
    Hi @pqyt

    thank you for your awesome plugin. I have a newbie question, I have installed v0.7.6.2 (Foobar2000 v2.1.4 32bit), if I set the Frame Counter on and at the same time I try to change the Refresh Rate Limit to 100Hz or 200Hz the counter always shows about 60 fps. My monitor refresh rate is 144Hz (correctly set in Windows display options). Is the bar animation always capped to about 60 fps maximum ? Thank you in advance

    Title: Re: foo_vis_spectrum_analyzer
    Post by: Case on 2024-04-20 06:57:42
    My original assumption was that people are limited to ~64 fps because by default Windows timer resolution is about 15.6 ms. That allows only about 64 timer triggers per second. But that would have been weird as for example audio playback normally causes the resolution to increase. And having a web browser open generally also increases the resolution.

    But there is something more going on. My timer resolution was 1.0 ms because of background processes and I had a nice 100 fps rendering from this component. But once I shut down all background programs that increased the resolution so that the system returned to default 15.6 ms timer, Spectrum Analyzer got limited to ~64 fps here too.
    And now even if I force timer to 0.5 ms accuracy I can't surpass the 60-something limit. My monitor is running at 144 Hz too.

    Hopefully pgyt can figure out what is limiting this thing.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-20 07:20:45
    Hi @pqyt

    thank you for your awesome plugin. I have a newbie question, I have installed v0.7.6.2 (Foobar2000 v2.1.4 32bit), if I set the Frame Counter on and at the same time I try to change the Refresh Rate Limit to 100Hz or 200Hz the counter always shows about 60 fps. My monitor refresh rate is 144Hz (correctly set in Windows display options). Is the bar animation always capped to about 60 fps maximum ? Thank you in advance
    Direct2D has no direct way AFAIK to impact the refresh rate. It's tied to the DirectX swap chain and the swap chain, by default, is tied to the monitor refresh rate. The DXGI layer of DirectX does provide an API to interact with the swap chain. I've dabbled with it before when experimenting with background transparency. Re-introducing DXGI is on the To Do list.

    Most DirectX example code is focused on gaming and does not care how the refresh impacts other processes and just uses a high frequency system counter but a fb2k component has to co-exist on the desktop with other applications.

    So, to answer your question: my code is not limited to 60Hz. It goes where the timer takes it. But I have to use other API's to make it listen to higher refresh rates. Hard to test when my own set-up is limited to 60Hz...
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Sue Dunham on 2024-04-20 15:15:29
    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.

    Then again, color selection dialogs in general seem wonky the way I have WINE set up; they often load with the wrong color value even off the DUI color settings. Yours seems different though, with the alpha value included.

    Has anyone else encountered the like or troubleshot color dialogs in general? Perhaps there's a .NET library that clears it up on installation?

    Setup
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-20 16:13:44
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Sue Dunham on 2024-04-21 16:57:35
    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 (https://superuser.com/questions/1375424/standard-windows-pick-color-dialog-doesnt-allow-to-enter-3-digit-color-codes), 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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Sue Dunham on 2024-04-21 23:52:52
    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?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-22 05:46:13
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-25 17:21:53
    Work in progress:

    - Separate peak and RMS read-outs
    - Left/Right and Mid/Side level meters with configurable channel pair.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-04-28 18:46:40
    Work in progress:

    - Vertical scrolling spectogram, aligned with the bars of the spectrum analysis on top.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-04-29 06:55:19
    - 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)
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-05-01 18:59:08
    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 (https://github.com/stuerp/foo_vis_spectrum_analyzer/releases/tag/v0.8.0.0-beta1) until the final release.

    I'd appreciate any (constructive) feedback about the implementation of the balance and correlation meter and the vertical spectogram.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-05-01 22:40:28
    @pqyt

    Great to see new functionality.

    Unfortunately total gauge gap calculation with different windows scaling than 100%, 200%, 300%  is still bugged and thus bars are calculated and displayed too small.

    Did you miss my bug report?
    https://hydrogenaud.io/index.php/topic,125031.msg1043230.html#msg1043230
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-05-02 15:10:25
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-05-02 16:40:13
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: misha93 on 2024-05-02 19:55:35
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-05-03 06:54:21
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Defender on 2024-05-03 09:13:14
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-05-03 22:10:45
    Work in progress: Radial spectrum bars
    Title: Re: foo_vis_spectrum_analyzer
    Post by: Azuriye on 2024-05-05 13:22:10
    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?
    Title: Re: foo_vis_spectrum_analyzer
    Post by: pqyt on 2024-05-05 16:09:08
    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.
    Title: Re: foo_vis_spectrum_analyzer
    Post by: TF3RDL on 2024-05-05 16:22:44
    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