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

Re: foo_vis_spectrum_analyzer

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

 

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #403
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)

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #406
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 for now.

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #409
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 and this) 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 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 and this, 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

Re: foo_vis_spectrum_analyzer

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


Re: foo_vis_spectrum_analyzer

Reply #412
@TF3RDL ,

However, a correct one for both reaction alignment (as I've found by using Desmos graph like this and this) 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.

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #415
Sneak preview:


Re: foo_vis_spectrum_analyzer

Reply #416
@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 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.
• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #419
@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.
• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #421
@pqyt, my original comment 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, 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 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.
• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data

Re: foo_vis_spectrum_analyzer

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

Re: foo_vis_spectrum_analyzer

Reply #423
Sneak preview:


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:
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

Re: foo_vis_spectrum_analyzer

Reply #424
@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: