Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_vis_spectrum_analyzer (Read 96725 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: foo_vis_spectrum_analyzer

Reply #250
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?

 

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #255
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'

Re: foo_vis_spectrum_analyzer

Reply #256
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).




Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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




Re: foo_vis_spectrum_analyzer

Reply #259
This is the config of old Channel Spectrum. I just have to enable Transparant background and I'm all set.

Re: foo_vis_spectrum_analyzer

Reply #260
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 };
}


Re: foo_vis_spectrum_analyzer

Reply #262
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, 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 technique)?

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #264
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?

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #267
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 repository or upgrade from within foobar2000.

Just a quick bug fix release because the new features are far from done yet.


Re: foo_vis_spectrum_analyzer

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


Re: foo_vis_spectrum_analyzer

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


Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #274
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 ;-)