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 72346 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: foo_vis_spectrum_analyzer

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


Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #34
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 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 }
korth

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #37
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 (Channel Spectrum panel remake) and another (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)


Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #41
@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?

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #43
@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.


Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #47
* 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) 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 (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)

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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