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

Re: foo_vis_milk2

Reply #25
Tested v0.0.230-alpha with a subset of Geiss's favorite presets & textures extracted into milkdrop2/presets and milkdop2/textures directories and can confirm this works as expected! Whatever the code quality, you really did a nice job.

I just noticed few hints that could be nice to improve/fix:
  • The preset loader is rather broken when invoked with the help opened
  • The song title seem to come straightly from the playlist. I would love to get an evaluated one in the mood of the Window title for example, in order to get the details from streams
  • The title animation at song change doesn't seem to work
  • Changing basic component parameters while it is working doesn't seem to make it crash most of the time, but the changes often require a foobar restart to be applied
  • The framerate limiter doesn't seem to work above 40 fps which seem the highest I could get

Re: foo_vis_milk2

Reply #26
Thank you @Dfaure.
  • I'll look into the preset loader rendering. It was working fine for me and could navigate the whole directory tree up/down--scary enough that I put a limiter so it can't easily jump out the foobar2000 profile directory. I'll try hard to make it look bad so that I can fix it.
  • Not exactly, the song title field comes from the metadata and simply grabbing "%title%". Am I understanding correctly that what you want is to be able to customize that into say any arbitrary metadata display? Complex stuff like these or something else?
    Code: [Select]
    [%album artist% - ]['['%album%[ CD%discnumber%][ #%tracknumber%]']' ]%title%[ '//' %track artist%]
    %codec% | %bitrate% kbps | %__bitspersample% bit$ifequal(%__bitspersample%,1,,s) | %samplerate% Hz | $caps(%channels%) | %playback_time%[ / %length%]
    May be a nice addition to the preferences.
  • Do you mean the 3D flying animated song title that is in the DirectX 9 version? If so, I haven't ported that yet and forgot to grey out that and the custom messages which are definitely works-in-progres.
  • Unless you're changing the advanced preferences the changes should take without restarting on the next frame render. Some might be unstable if changed during running. If I'm not mistaken Winamp makes you stop the visualization to launch the configuration window. (BTW, have not found how foobar2000 lets components know changes have been applied in advanced prefs).
  • The frame rate runs off the Win32 timer, you're seeing basically the limit of how fast that can pump messages into the window. I don't think it'll run in single-digit milliseconds. If the limiter is faster, it will not be the limiting factor. I'm looking into migrating to the threadpool timer, a timer queue or (my preference) the StepTimer that uses QFC directly. Just be careful to not burn out your GPU.

Thanks for the feedback.

Re: foo_vis_milk2

Reply #27
Many thanks for the effort!
Unfortunately Foobar freezes and doesn't even make a crash report when I can get it to close (on Win10 x64 on v0.0.230).
Any hints on what I can do to make it run?

Re: foo_vis_milk2

Reply #28
Nevermind, deleting the 'config.sqlite' file did the trick!
So the presets have to be downloaded externally?

Re: foo_vis_milk2

Reply #29
My apologies for not reading properly, I found in the component description the link to the Milkdrop author's favorite presets which is more than adequate.
Many thanks again!!

Re: foo_vis_milk2

Reply #30
I'll look into the preset loader rendering. It was working fine for me and could navigate the whole directory tree up/down--scary enough that I put a limiter so it can't easily jump out the foobar2000 profile directory. I'll try hard to make it look bad so that I can fix it.
Indeed, that's working as expected, but as soon as the milkdrop window is displaying both the help message and the preset browser, the latter doesn't handle very gracefully the scrolling, leading to overlapping preset names.

Not exactly, the song title field comes from the metadata and simply grabbing "%title%". Am I understanding correctly that what you want is to be able to customize that into say any arbitrary metadata display? Complex stuff like these or something else?
Code: [Select]
[%album artist% - ]['['%album%[ CD%discnumber%][ #%tracknumber%]']' ]%title%[ '//' %track artist%]
%codec% | %bitrate% kbps | %__bitspersample% bit$ifequal(%__bitspersample%,1,,s) | %samplerate% Hz | $caps(%channels%) | %playback_time%[ / %length%]
May be a nice addition to the preferences.
That's it. While playing streams saved as playlist entries, I couldn't get the artist+title which is dynamically defined along the streaming.

Do you mean the 3D flying animated song title that is in the DirectX 9 version? If so, I haven't ported that yet and forgot to grey out that and the custom messages which are definitely works-in-progres.
This explains that.

Unless you're changing the advanced preferences the changes should take without restarting on the next frame render. Some might be unstable if changed during running. If I'm not mistaken Winamp makes you stop the visualization to launch the configuration window. (BTW, have not found how foobar2000 lets components know changes have been applied in advanced prefs).
I'm far from familiar with the Foobar SDK. Could'nt really help here, but I noticed that crashes occurred mainly when altering the mesh size.

The frame rate runs off the Win32 timer, you're seeing basically the limit of how fast that can pump messages into the window. I don't think it'll run in single-digit milliseconds. If the limiter is faster, it will not be the limiting factor. I'm looking into migrating to the threadpool timer, a timer queue or (my preference) the StepTimer that uses QFC directly. Just be careful to not burn out your GPU.
In fact, I was limiting it to 60Hz and couldn't have it reaching that frequency.

Thanks for the feedback.
You're welcome

PS: I'll PM you a crash dump

Re: foo_vis_milk2

Reply #31
Source code posted publicly. The URL is on the component page.

Some notes:
  • This is a personal project for which I had never had any intention to grow beyond a single user (me). All development has been done in my spare time, outside of my professional obligations.
  • I am not a graphics programmer nor have any professional experience in that area.
  • I have only tested the component on a single machine, a single graphics card and a single monitor.
  • I do not code sign the DLL, so be cautious of the provenance of your builds.
  • While the DLL is linked to NOT have any UAC or elevated privileges beyond what the application loading the DLL has, foobar2000 does try to elevate during install and at other times. Be mindful of security and run your applications and this DLL in the most isolated environment practicable.
  • I am not affiliated with the foobar2000 developers, the projectM developers, the Winamp team or Nullsoft.
  • Regarding licensing, I tried to be thorough in documenting provenance of all source code. Nevertheless, there might be some oversights.

-oops

Re: foo_vis_milk2

Reply #32
Well I'm far too stupid to compile that / attempt CUI support. Someone else can have a go.

I can't even add references to the fb2k SDK/CUI SDK projects after adding them in the right place. VS is saying nope. :/

Also, I have no idea what this crapola is.

Code: [Select]
1>-- Could NOT find BISON (missing: BISON_EXECUTABLE) (Required is at least version "3.8")
1>-- Could NOT find FLEX (missing: FLEX_EXECUTABLE) (Required is at least version "2.6")

cmake is alien to me. Could google it but... nah. :P

Re: foo_vis_milk2

Reply #33
Those messages come from the ProjectM evaluator. It uses CMake. Bison and Flex are the parser and lexer that generate Compiler.[ch] and Scanner.[ch] in that subrepo. But this project is purely MSBuild-based. I'll break down step-by-step how to set up and compile the component. However, if you can follow the GitHub Actions workflow, you'll find all you need.

Re: foo_vis_milk2

Reply #34
A step-by-step on how to compile:
  • Install Visual Studio 2022 and Git. Clone the repository. "Open a project or solution" and point it to the foo_vis_milk2.sln file.
  • Ensure you have all you need for Visual Studio by doing Tools->Get Tools and Features... In the installer that comes up hit the More dropdown and select Import configuration. In the file selection dialog, point it to .vsconfig in the repo to install things like NuGet, ATL and a few other things.
  • In Solution Explorer, if the "foo_vis_milk2" project is not bold font, right click on it and select Set as Starter Project
  • In Solution Explorer again, right click on the Solution 'foo_vis_milk2' line at the top and select Manage NuGet Packages for Solution. Use the tab that comes up to install DirectXTK and WTL; they should be pre-populated but you can search if not. I ignore dependencies, but you can install XAudio if you find it simpler than tinkering with the options.
  • Download the foobar2000 SDK and place it in the external directory according to the file layout in the README. Then use the CLI (PowerShell below) to patch it:
    Code: [Select]
    Set-Location -Path "path\to\repo"
    Set-Location -Path "$(Get-Location)\external"
    git init
    git add foobar2000\ libppui\ pfc\
    git commit -m 'Initial commit'
    git apply --ignore-whitespace --whitespace=nowarn --verbose "$(Get-Location)\fb2ksdk.patch"
    Remove-Item -Path "$(Get-Location)\.git" -Recurse -Force
  • Clone the projectm-eval repo into the external directory and patch it in a similar manner to the SDK:
    Code: [Select]
    Set-Location -Path "path\to\repo"
    Set-Location -Path "$(Get-Location)\external\projectm-eval"
    git apply --ignore-whitespace --whitespace=nowarn --verbose "$(Get-Location)\..\pmeel.patch"
  • Then just select your desired build configuration, for example Debug x64 and do Build->Build Solution.
  • For quick debugging I have this in my foo_vis_milk2.vcxproj.user (obviously all configs but only including Debug x64 to illustrate--obviously your install locations may be different). It includes how to attach foobar2000 to the debugger and update the version of the component DLL with the most recent build:
    Code: [Select]
    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
        <LocalDebuggerCommand>$(LocalAppData)\Programs\foobar2000_x64\foobar2000.exe</LocalDebuggerCommand>
        <LocalDebuggerDebuggerType>NativeOnly</LocalDebuggerDebuggerType>
        <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
      </PropertyGroup>
      <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
        <PostBuildEvent>
          <Command>copy "$(TargetPath)" "$(LocalAppData)\Programs\foobar2000_x64\profile\user-components-x64\foo_vis_milk2"</Command>
        </PostBuildEvent>
        <PostBuildEvent>
          <Message>Copying "$(TargetFileName)" to components directory...</Message>
        </PostBuildEvent>
      </ItemDefinitionGroup>
    </Project>
  • As a bonus, for the Columns UI SDK you can download it and place it in the external directory. Then in Solution Explorer, right click on the Solution 'foo_vis_milk2' line at the top and select Add->Existing Project.... In the file picker find columns_ui-sdk-public.vcxproj and click the Add button. Then follow their documentation.

Re: foo_vis_milk2

Reply #35
Okay, I've been trying out the component for a bit. At first the problem appeared to persist despite the update; adding the UI element froze foobar and I had to close it using task manager, however, after tinkering around for a bit, I decided to mess around in the settings before adding the UI element, this fixed the issue. Just to make sure, I checked returning to the previous settings, which didn't replicate the issue, so I assume there must've been some leftover glitched out configuration from the previous version that was cleaned up when playing with the settings (It may have been the same thing Wabznazm was experiencing).

Some other issues I've observed:
  • It appears that setting mesh size to anything other than minimum (8x6) consistently crashes foobar for me (If I'm not mistaken, this is default, despite 48x36 being labeled as default)
  • The "Reset page" button on the context menu doesn't appear to work
  • It's a minor detail, but the time between automatic preset changes and the threshold for hard cuts were both set to minimum when I finally got the component working, so the display was initially strobing like crazy.
  • The keyboard menus can cause crashes. Pressing L twice or scrolling to the bottom of the presets menu consistently crash foobar for me.
  • The "previous preset" button on the context menu appears to make the preset title in the context menu get stuck.

Regardless, I'm really enjoying this component, all the patches I've tried seem to work pretty well and run very smoothly and I've been having lots of fun trying them out! Thanks for sharing this great work and even making it open source! :)

Re: foo_vis_milk2

Reply #36
there is something called milkdrop3. it works on ANY audio source.

Re: foo_vis_milk2

Reply #37
Couple of issues trying this here today.

Firstly, right clicking on the Milkdrop window instantly crashes Foobar (bug report sent).

Secondly, changing the default preset folder in the Advanced Preferences doesn't stick. Change it, hit Apply, OK, then go back to the same setting and it changes itself back to the default: C:\Users\...\AppData\Roaming\foobar2000-v2\milkdrop2\presets\

 

Re: foo_vis_milk2

Reply #38
there is something called milkdrop3. it works on ANY audio source.

Yea but I like in the UI as its on a tab below my playlist where I can pick other visualizers.

I have it working. I had to just export all the presets to the correct appdata roaming folder on a fresh x64 install. One thing I noticed is that if I right click on the tab of milkdrop it crashes foobar every time. I used to run an older integration of milkdrop and I think that used to have a right click menu where you could pick the option to go fullscreen.

One other issue at the moment, when I set foobar to always on top, when I double left click on milkdrop tab then it goes a type of fullscreen but foobar is still over the top. In the old version it would go fullscreen and over ride that. It looks like its in fullscreen windowless mode which is fine. I just have to remember if I want fullscreen to disable always on top.

Other than that its working perfect.