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_vumeter (Read 18311 times) previous topic - next topic
CharlesteSit and 4 Guests are viewing this topic.

Re: foo_vis_vumeter

Reply #150
Implemented in 0.5.7. Now RMS+Peak doesn't happen by default, it is instead selectable through the "Levels->Mixed" option. I've added an explanation for it to the documentation.

Also fixed the stop behavior for the LEDs in "Mixed" mode (they "turn off" when player stopped).

Lastly the crash should not happen anymore for the .bin file inside the RAR archive above. The base offset for the second meter when the file includes both sides and also LEDs was calculated incorrectly leading to out-of-bounds accesses.
Oops, thank you so much for implementing my request on the selectable level display option for meters having both LEDS and needles, it works perfectly on both the AIMP and BIN meters I've tried.  And, that problem BIN I posted now loads immediately and with no crashes.  If there's a way to improve your plugin further, I certainly don't know what that is!


Re: foo_vis_vumeter

Reply #152
hi sveakul i feel so stupid as all i had to do was right click on the main window and this gave me a list of options and skins to use sorry for being so daft

Re: foo_vis_vumeter

Reply #153
For that reason, I would consider unable to create/acquire the DirectX device a critical issue and stopping the application is the right course of action (maybe could be done in a more informational/user-friendly way though).

I thought it would be better for the component to fail gracefully and still allow foobar to start up. I'm not sure if the issue lies with foobar itself unable to handle this component failure, or this component fail in such a way that it causes the foobar process to abort (foobar main window does not even show up).
Initially I was scratching my head trying to figure out how to start up foobar and then remove the component ... then it dawn on me to go to the profile folder and delete away the component. Hence the workaround I mentioned earlier.


Quote
Plus, it is the least of your problems since much of the OS shell is hardware accelerated using Direct2D and the like.

Windows OS works fine in the VM.

Quote
I also would assume several of the built-in visualizations use Direct2D so if you include those in the UI, do they cause any issues?

Good idea ... when I have the time, I'll see if I can find another foobar component that requires Direct3D to test and see if it crashes foobar inside the VM...

Re: foo_vis_vumeter

Reply #154
The 3D accelerator VMWare virtualizes/emulates only supports Direct3D 11. DirectX 12 requires newer 3D accelerator. According to Wikipedia: "DirectX 12 is supported on all Fermi and later Nvidia GPUs, on AMD's GCN-based chips and on Intel's Haswell and later processors' graphics units."

While Windows 10 comes with DirectX 12 software, it doesn't do anything good without new-enough hardware.

Re: foo_vis_vumeter

Reply #155
I thought it would be better for the component to fail gracefully and still allow foobar to start up. I'm not sure if the issue lies with foobar itself unable to handle this component failure, or this component fail in such a way that it causes the foobar process to abort (foobar main window does not even show up).
I still would consider the inability to create the device a very fatal error. foobar2000 exits because the initialization code I use (DeviceResources.cpp from Microsoft) throws an exception. Furthermore, I am not the appropriate person to fix a multi-billion-dollar corporation's (VMware) HAL shortcomings--it's kind of pathetic from them in all honesty. Nor am I keen to second-guess Microsoft's graphics experts and fiddle with the adapter check/selection and bring up.  However, I'm providing a workaround where the component will fall back on the WARP device if there is no capable DirectX 12-capable hardware adapter available.

While Windows 10 comes with DirectX 12 software, it doesn't do anything good without new-enough hardware.
DirectX 12 released in 2015 and it runs on hardware that is "older" than that (see Haswell). On the Steam Hardware Survey over 90% have a DirectX 12-capable GPU. We collectively need to update our definitions of "new" in this forum.

Maybe a good time to implement CUI support.
Already done, but I absolutely refuse to support any issues due to it. Plus, since there are no releases for ARM64 architecture for the main CUI component and thus the feature will not be available there until that happens.

Re: foo_vis_vumeter

Reply #156
Maybe a good time to implement CUI support.
Already done, but I absolutely refuse to support any issues due to it. Plus, since there are no releases for ARM64 architecture for the main CUI component and thus the feature will not be available there until that happens.
Good to hear!

No support is fine, there was never any support for the old version too.

I installed foo_vis_vumeter-0.5.7.0 on fooBar x86 CUI/PSS. As expected the new plugin is installed and all old instances of VU Meter disappeared from my skin, hence the gaping hole.

Are you sure CUI support is implemented in 0.5.7.0? Maybe I'm stupid, where can I find the new VU panel (DX12) to add as a panel?

Re: foo_vis_vumeter

Reply #157
i found it in view menu ..visulisation  but I am daft heh

Re: foo_vis_vumeter

Reply #158
Are you sure CUI support is implemented in 0.5.7.0? Maybe I'm stupid, where can I find the new VU panel (DX12) to add as a panel?
It is not activated in 0.5.7. As I said, I do not have the bandwidth to support another UI framework, so finding it requires slightly more legwork and self-sufficiency. I'm being deliberately vague because, in general, users will fail to understand what no technical support really means.

i found it in view menu ..visulisation  but I am daft heh
The separate window from View > Visualizations > VU Meter (DirectX 12) is always available. That is still using Default UI.

Re: foo_vis_vumeter

Reply #159
Are you sure CUI support is implemented in 0.5.7.0? Maybe I'm stupid, where can I find the new VU panel (DX12) to add as a panel?
It is not activated in 0.5.7. As I said, I do not have the bandwidth to support another UI framework, so finding it requires slightly more legwork and self-sufficiency. I'm being deliberately vague because, in general, users will fail to understand what no technical support really means.
I don't have a clue what your saying. I don't need technical support, I just need to be able to add a panel  and test current standings of your foo_vis_vumeter CUI (x86) version.

Already done, but I absolutely refuse to support any issues due to it. Plus, since there are no releases for ARM64 architecture for the main CUI component and thus the feature will not be available there until that happens.
Your message is ambiguous at best. I don't want support. I don't use CUI ARM64, I have CUI x86 (running on a very fast system and of course DX12) and will be using x86 at least until a decent version of foo_vis_vumeter and some other components are released.

Are you saying you hold back the CUI x86/x64 version of your component, while you already have it ready, until CUI ARM64 is released?
If so, than don't say it's done.

EDIT: The Menu - View - Visualisations - VU Meter (DX12) works fine and has a lot of extra new settings/options to play with. How can I add/dock  it to a CUI panel?

EDIT2: One of the things I don't like is that the your component overwrites the old component, which makes it very hard to test since you cannot compare the old and new component running side by side.

Re: foo_vis_vumeter

Reply #160
Maybe I'm stupid, where can I find the new VU panel (DX12) to add as a panel?
I know nothing about CUI, but in DUI the VU Meter (DX12), if added to your Components (foo_vis_vumeter), will appear as a choice when using Layout Editing Mode to add a panel in the element group "Playback Visualisation."

If oops said he doesn't want to discuss CUI please let it go at that and ask someone in the CUI group, we don't need another disappearing developer (Crossover).

Re: foo_vis_vumeter

Reply #161
Maybe I'm stupid, where can I find the new VU panel (DX12) to add as a panel?
I know nothing about CUI, but in DUI the VU Meter (DX12), if added to your Components (foo_vis_vumeter), will appear as a choice when using Layout Editing Mode to add a panel in the element group "Playback Visualisation."

If oops said he doesn't want to discuss CUI please let it go at that and ask someone in the CUI group, we don't need another disappearing developer (Crossover).
Last I will say about it, I would not want to spoil anything for DUI users.

In CUI there's also a Live Editing Mode (which I never use/used). Which leads to something very similar as when rightclicking on a splitter where you can add a panel. Problem is that this plugin does not present itself in the options for panels (visualizations) to add as a panel.
So yes, I can open the visualization with Menu - View - Visualization - VU Meter (DX12) and it works without any issue in a kind of floating window, with a whole lot of nice modern/new/extra options and a modern interface, but it cannot be docked in a designated panel or saved.

I don't have a problem in case this functionality is not implemented yet, but apparently it is, so I am quite confused:
"CUI support. Already done, but I absolutely refuse to support any issues due to it. Plus, since there are no releases for ARM64 architecture for the main CUI component and thus the feature will not be available there until that happens."
Perhaps my understanding of the English language is not adequate enough, to realize that the message actually is, yes I have it, but you cannot test/implement it, because CUI has no ARM64 support. I have x86/x64, not ARM64.

Re: foo_vis_vumeter

Reply #162
I don't have a problem in case this functionality is not implemented yet, but apparently it is, so I am quite confused.
Columns UI support has been in the component since release 0.5.0. It is the "easter egg" mentioned. Sorry to spoil the surprise :( The method to enable it is locked behind a scavenger hunt which is at the level of a newbie Black Hat puzzle. Confusion is the starting point. It does require large doses of curiosity and some passing knowledge of computer history and PE format to unlock--or some alternative workaround method which I'll leave unmentioned.

On x86 and x64 platforms it works with the publicly released version of Columns UI. To make ARM64 versions work, I needed to extend and compile my own Columns UI component version--that is what I was referring to--but no expectations on anyone to go that far. And yes, you should see an entry in the context menu when using Live Editing Mode and it is dockable/embeddable in the UI as a panel.

But alas, since no one has reported finding the "easter egg," I moved the feature from behind the lock a few days ago [and finding the easter egg now unlocks something else]. If you're not seeing it when using the latest version, then I cannot help ;)

Re: foo_vis_vumeter

Reply #163
But alas, since no one has reported finding the "easter egg," I moved the feature from behind the lock a few days ago [and finding the easter egg now unlocks something else]. If you're not seeing it when using the latest version, then I cannot help ;)
oops, despite my own lack of need for CUI, thanks for making its compatibility easier to find for those that do.  It shows a real good-natured respect for Foobar users in general that is admired.

Re: foo_vis_vumeter

Reply #164
Released 0.7.2. Taken with the more recent 2 updates there are a large number of changes. The highlight summary with clarifications:
  • Starting with 0.6.0, you can use this component as a Columns UI panel without unlocking the easter egg.
  • 0.6.0 also allows using the WARP rasterizer for virtual machines and the like which do not have a DirectX 12 adapter. However, you need to download the DLL (d3d10warp.dll) from NuGet since I'm not allowed to distribute it. Plus, for security reasons that is best. Place the DLL beside foo_vis_vumeter.dll.
  • 0.7.2 is the result of a massive cleanup and reordering of the renderer to be able to have Direct3D elements on top of Direct2D and/or DirectWrite elements.
  • 0.6.0 adds reading of RAR archives that contain a BIN file and INI file. 0.7.2 adds ability to override the background color through the INI file to go with 0.6.7's ability to control other settings such as the layout.
  • BIN files could be compressed using BZIP2 and LZMA from the start. But if you desire now, also GZip (0.7.2), ZStandard (0.6.0), LZ4 (0.7.2). And all algorithms support concatenating the left/top with the right/bottom panels (using the `cat` command).
  • Fixed stuck LEDs, in case you saw that bug prior to 0.6.0.
  • 0.6.7 adds a frame counter and video freeze to the "Options" menu.
  • There is a new easter egg in case any of you feel like a challenge.

Re: foo_vis_vumeter

Reply #165
VU Meter (DirectX12) CUI seems to have a one size fits all approach, compared to the old VU Meter.

You can see the problem I'm having in this video...

www.youtube.com/watch?v=xyrqYRq1Ka0

It also doesn't seem to save settings on exit as I have to set it up again every time I reboot fb2k. (I did not show this behavior in the video)

BTW, I know oops isn't supporting CUI, but just thought I'd mention this.

Re: foo_vis_vumeter

Reply #166
@Majestyk

Version: 0.6.0, released on 2024-11-21
https://www.foobar2000.org/components/view/foo_vis_vumeter/releases
Change log:
Implement Columns UI support
Speed up initialization
Refine fullscreen
Fix settings save and reload

Depending on the skin, settings may not be saved. Most settings are saved in the latest version.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)

Re: foo_vis_vumeter

Reply #167
In the video I used 0.7.2.

Re: foo_vis_vumeter

Reply #168
EDIT2: One of the things I don't like is that the your component overwrites the old component, which makes it very hard to test since you cannot compare the old and new component running side by side.
You can absolutely compare the two versions running side-by-side on the x86 build. Just rename one component folder and DLL to something different. For example I renamed the old component <user components folder>/foo_vis_vu_meter/foo_vis_vu_meter.dll. Been running like that ever since I was able to decode the BIN format.

VU Meter (DirectX12) CUI seems to have a one size fits all approach, compared to the old VU Meter.

It also doesn't seem to save settings on exit as I have to set it up again every time I reboot fb2k. (I did not show this behavior in the video)
Settings are saved in 0.7.2. Just tested. I stared at the video for a long time trying to decipher what you're doing. Let me try to put it into words and note that what follows applies equally to DUI and CUI: you seem to have several instances running at the same time--more than 2. foobar2000 keeps the configuration in a SQLite database. So, I only hold 2 different sets of configuration settings at runtime because that is generally what fits in a single entry (unless I use blobs which was a pain in foo_vis_milk2 so decided to avoid that here). Basically ping-pong'ing between each new opened instance using the instance id modulo 2 to pick. Settings are then saved in the order of closing; last wins. But since "I think" you have more than 2 running at the same time, you might be saving one of the hidden windows depending on how foobar2000 is pumping the WM_DESTROY messages on exit. Fullscreen is special because in DUI it is associated with a non-fullscreen window which is a completely separate window from the embedded or undocked window which is a huge pain. Oh, and foobar2000 leaks memory when you create new panels; specifically in the settings/preferences data--it is in the proprietary player code--so don't go too crazy.
Surely I got something wrong in my interpretation of what's happening, but your use case is simply not something I envisioned. My setup is less visually impressive.

Re: foo_vis_vumeter

Reply #169
So. Much. Fail.

The key word in this code is instance.

Code: [Select]
class DUIPanel : public ui_element_instance, public CWindowImpl<DUIPanel>
{
public:
ui_element_config::ptr get_configuration() final
{

}

void set_configuration(ui_element_config::ptr data) final
{

}

private:
ui_element_instance_callback::ptr m_callback;
};

Instance data is saved inside theme.fth for default UI.

If you're using cfg_XXX or the configStore APIs inside these then you've seriously fucked up.

 

Re: foo_vis_vumeter

Reply #170
Instance data is saved inside theme.fth for default UI.

If you're using cfg_XXX or the configStore APIs inside these then you've seriously fucked up.
It is a deliberate design decision. I use what is easiest for me. And I just don't like that SerDes API and didn't particularly enjoy using it in the other components. I especially don't like that the stream classes are different between DUI and CUI. Plus "instance" data leaks memory, the CRT debugger/profile/sanitizer lights up when I use it (I can see my sentinel values in the leaked memory dumps) and have to exclude exceptions! So decided to skip it for this purpose. Maybe it's the wrong architectural decision, but since it does not affect my enjoyment of the component, I can live with that. In this component, there is ONE golden configuration per DLL LoadLibrary.

That said, every time you chime in here, I learn something new. Many thanks mark2k3!

Re: foo_vis_vumeter

Reply #171
Instance data is saved inside theme.fth for default UI.

If you're using cfg_XXX or the configStore APIs inside these then you've seriously fucked up.
But just so no one claims I don't try to improve things, I just tried converting the configuration partially to it being per instance. Breaks fullscreen massively, due to the fullscreen implementation in Default UI where it is a completely separate instance. The breakage is unacceptable: I can't even exit fullscreen via regular methods, none of the BIN files transfer, the panel is not in the same mode, position, layout as the windowed version.

It is implemented the way it is because that is what I was able to make work with the functionality I targeted. And see my data inside the memory leaks in the CRT every time I edit the layout for this component, whereas when I don't use the per-instance theme data no leaks occur (from this component).

I think I'll leave as is.

Re: foo_vis_vumeter

Reply #172
Make your BIN files smaller by converting them to LZMA compression; have an option to combine meters consisting of multiple BIN files into just one.  BinExtractor 1.2 from BoringName:

"Changes
- Added a "Save Bin File" button. This will save the currently loaded bin as a single Bin file using LZMA compression. It will be saved in the same location as the loaded bin with "_new" appended to the file name.
Use cases -
- Repackage a bin using BZip2 compression to use LZMA which loads a lot faster.
- Repackage an uncompressed bin to use LZMA compression and take up less space.
- Repackage bin files stored as separate files for left and right meters into a single bin file. eg) Accuphase A-46 1.bin, Accuphase A-46 2.bin will be saved as a single bin file Accuphase A-46 _new.bin. May be handy for skin creators to deploy a single file instead of 2."


Re: foo_vis_vumeter

Reply #173
Thank you for the tool to you and BoringName. As always, some CLI magic can do the same if you know how to use cat and pipes.

On the compression algorithms. What I see mirrors what you get if you select a benchmark that is a few megabytes and a desktop processor. Assuming defaults for the reference executable: BZip2 gives the best compression but the slowest decompression, LZMA follows with almost the same ratio but slightly faster to decompress. GZip/Zlib follows those. But LZ4 and ZStd have the best tradeoff between compression size and decompression speed:
Squash benchmark

I've tried to implement all of them using their streaming functionality and with the lowest-level API functions available. Based on the implementations, I would guess that Zstd would be the fastest because it can decompress both L/R concatenated file streams without clearing the "context." All others finish their frame and need to re-set up before going again.

Lastly, a personal observation. LZMA (not XZ or LZMA2) is the worst of the bunch in one metric: there is no way to identify the compression scheme using a magic number. That means that I can craft a valid uncompressed BIN file header that would identify as LZMA-compressed. This is a rather inconvenient oversight and it is why I decided not to include Brotli as it shares the same issue.

Obviously don't listen to anything I say if you care about reusability and portability, just use BZip2 or LZMA and enjoy.

Re: foo_vis_vumeter

Reply #174
EDIT2: One of the things I don't like is that the your component overwrites the old component, which makes it very hard to test since you cannot compare the old and new component running side by side.
You can absolutely compare the two versions running side-by-side on the x86 build. Just rename one component folder and DLL to something different. For example I renamed the old component <user components folder>/foo_vis_vu_meter/foo_vis_vu_meter.dll. Been running like that ever since I was able to decode the BIN format.

VU Meter (DirectX12) CUI seems to have a one size fits all approach, compared to the old VU Meter.

It also doesn't seem to save settings on exit as I have to set it up again every time I reboot fb2k. (I did not show this behavior in the video)
Settings are saved in 0.7.2. Just tested. I stared at the video for a long time trying to decipher what you're doing. Let me try to put it into words and note that what follows applies equally to DUI and CUI: you seem to have several instances running at the same time--more than 2. foobar2000 keeps the configuration in a SQLite database. So, I only hold 2 different sets of configuration settings at runtime because that is generally what fits in a single entry (unless I use blobs which was a pain in foo_vis_milk2 so decided to avoid that here). Basically ping-pong'ing between each new opened instance using the instance id modulo 2 to pick. Settings are then saved in the order of closing; last wins. But since "I think" you have more than 2 running at the same time, you might be saving one of the hidden windows depending on how foobar2000 is pumping the WM_DESTROY messages on exit. Fullscreen is special because in DUI it is associated with a non-fullscreen window which is a completely separate window from the embedded or undocked window which is a huge pain. Oh, and foobar2000 leaks memory when you create new panels; specifically in the settings/preferences data--it is in the proprietary player code--so don't go too crazy.
Surely I got something wrong in my interpretation of what's happening, but your use case is simply not something I envisioned. My setup is less visually impressive.

So are you saying that I can't have any more than two VU Meter (DirectX 12) entries? (As shows below)