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 75921 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Re: foo_vis_milk2

Reply #150
F1 key
-----
MilkDrop website: https://www.geisswerks.com/milkdrop/
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, HIFIMAN ANANDA, Bowers & Wilkins P7, FiiO FT5, FiiO FT1 Pro, 水月雨 (MOONDROP) 空鳴 - VOID, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)


Re: foo_vis_milk2

Reply #152
thank you that should help

Mark

Re: foo_vis_milk2

Reply #153
Hi There,

I downloaded cream of the crop as well as the original milkdrop presets and textures and put them in the milkdrop2/presets and textures and ran it it said "no presets file found in c:\users\markt\appdata\roaming\foobar200-v2\milkdrop2\*.milk

then I just copied the files directly to  c:\users\markt\appdata\roaming\foobar200-v2\milkdrop2 and it ran fine doesn't appear to look in the preset directory


Re: foo_vis_milk2

Reply #155
I think its working like old milkdrop looking for the presets in directory milkdrop and on the visualization dropdown it Shows as Milkdrop not Milkdrop2 and its not looking in the preset directory even when i told it to go there in the settings

Re: foo_vis_milk2

Reply #156
I think its working like old milkdrop looking for the presets in directory milkdrop and on the visualization dropdown it Shows as Milkdrop not Milkdrop2 and its not looking in the preset directory even when i told it to go there in the settings
when I move the milk files from the preset directory to the MILKDROP2 directory it runs fine

Re: foo_vis_milk2

Reply #157
I am going to do more testing this w/e see if I can get it working

Re: foo_vis_milk2

Reply #158
Can also confirm the layout issues appear to be fixed with the new update. Great job.

Re: foo_vis_milk2

Reply #159
I am going to do more testing this w/e see if I can get it working
Been trying to break it. Still resolves correctly for me to "<profile>\milkdrop2\presets". Try the following: Go into Advanced Preferences, under Display > Visualisations > MilkDrop, right click the Preset directory option and reset it. It'll go <empty>. Hit "Apply" and restart the player. It should repopulate correctly to the above path.

Re: foo_vis_milk2

Reply #160
Issue 1:
This component suffers from the same issue (even worse) as the non-wrapped version of foo_vis_vumeter.
It doesn't listen/comply to the coordinates it has been told.
In the case of foo_vis_vumeter that only happens after returning from fullscreen.

1) Milkdrop opens up (before fullscreen) not using the correct height (xyw are correct).
2) After fullscreen x=0, y=0, h=full height ... all of those are wrong, w is correct but shifted because of wrong x. Only after resize/track change the situation under 1 (with wrong height) is restored.

Shpeck and Oscilloscope use the same unwrapped construction both use correct coordinates after returning from fullscreen.
Please fix the issue.
There is no code for Shpeck. And Oscilloscope (at least Holger's) does not appear to support Columns UI. So, let's not use those as examples.
I believe I've fixed #2 in foo_vis_vumeter. #1 I haven't seen yet and don't even know how it would happen. The window creation is trivial, there is no style or owner/parent change. Are you sure it is an incorrect height or you're just running it at the minimum limit in that squished aspect ratio that is giving you the funky results? The "Scanning presets..." message looks correctly positioned and not distorted.

Issue 2:
I want to be able to define milkdrop in more than one place (actually I want 3 spots). And preferable be able to run those instances at the same time.

Is this on your todo list?
Unfortunately, this is very unlikely to happen. I started the attempt but decided not to proceed. A cursory glance of the original vis_milk2 library code will give a hint of how fundamental of a change is required to support multiple instances. Look at how g_plugin is used. This is just one of those Winamp legacy things. As to why it "works" in Schpeck, wild guess is that it launches one new full instance/process of Winamp.exe for each UI element.

Also, if you want 3, you must have a really good machine and GPU because the library is not very optimized and eats more RAM and GPU cycles than I care to admit.

I consider this component feature-complete. There are 3 nagging issues that I would try to address time-permitting:
  • Some memory that is not fully released on exit.
  • The square that renders sometimes instead of the text.
  • The right and bottom strobing effect on some presets.

Re: foo_vis_milk2

Reply #161
I tried blanking out the directory in advanced settings so now it points to .....Milkdrop2/presets
I have a presets directory that has a folder or many folders with *.milk files and jpgs that is downloaded from Creamofthecrop.
This comes up with the message that no presets are available.

Next I copied all files out of one of the folders into the preset folder and then it works correctly

I at a loss is there a setting that I need to turn on

Re: foo_vis_milk2

Reply #162
I went into the first directory of the (cream of the crop)-> ! Transitions and deleted the 4 JPG files there and restarted and milkdrop is working




Re: foo_vis_milk2

Reply #163
What are you expecting to happen or see?

Sorry I haven't been on here for a while. I don't have shpeck/milkdrop 2.25c (which played these presets correctly) anymore but I'll post the comparisons with milkdrop3 which is essentially the same thing.

The images ending with the number 1 are from your component while the ones ending with 2 are from milkdrop3

P.S. since you mention that this is based on ProjectM I suppose this is to be expected as people have stated on the official winamp/milkdrop forums that ProjectM doesn't render shader heavy presets correctly.

Re: foo_vis_milk2

Reply #164
I don't have shpeck/milkdrop 2.25c (which played these presets correctly) anymore but I'll post the comparisons with milkdrop3 which is essentially the same thing.

P.S. since you mention that this is based on ProjectM I suppose this is to be expected as people have stated on the official winamp/milkdrop forums that ProjectM doesn't render shader heavy presets correctly.
Firstly, nothing to do with ProjectM since that part is only for the Expression Evaluation Library. This component uses the open source MilkDrop2 library, period. You can see the code. The original EEL and EEL2 actually come from AVS. The issue at hand is that the shaders don't compile.

My bad for not displaying the HLSL compiler errors. As you can see, they are a bit large and require copying/sharing/moving large buffers across the component. That said, the problems are in the presets themselves. I cannot update all of the presets myself and, in my view, that other programs are lax in their acceptance of errors is not correct. It gives a false sense of correctness by lowering the quality across the board. Also tells me that much of the testing of these presets was ad hoc and the implicit assumption here that they should "just work" is overly optimistic.

Here is the output of "martin - gentle happiness" D3DCompile[1]:
Code: [Select]
Error compiling ps_4_0_level_9_3 warp shader:
Shader@0x000000FF7672F280(165,7-43): warning X3206: implicit truncation of vector type
Shader@0x000000FF7672F280(174,9-38): warning X3206: implicit truncation of vector type
Shader@0x000000FF7672F280(177,8-19): warning X3205: conversion from larger type to smaller, possible loss of data
Shader@0x000000FF7672F280(181,43-58): warning X3205: 'tan': conversion from larger type to smaller, possible loss of data
Shader@0x000000FF7672F280(181,1-60): warning X3205: conversion from larger type to smaller, possible loss of data
Shader@0x000000FF7672F280(172,9-28): error X3684: ps_4_0_level_9_3 does not support double-precision floating-point

This is simple, it's complaining about these two lines:
double3 ist = GetBlur1(uv*1);
double3 crisp = tex2D(sampler_main,uv);

From "martin - lonely goose":
Code: [Select]
Error compiling ps_4_0_level_9_3 warp shader:
Shader@0x000000FF77561E10(165,24-37): error X3005: 'pow': identifier represents a variable, not a function

Another simple one, this function uses pow as a variable and also the "pow()" function:
Code: [Select]
 float2 cpow(float2 base, float ex) {
   float moduz = sqrt(base.x*base.x + base.y*base.y);
   float thetaz = atan2(base.y, base.x);
   float2 pow = float2(pow(moduz, ex)*cos(thetaz*ex), pow(moduz, ex)*sin(thetaz*ex));
   return pow;
 }

Slightly more complex is the output of "Martin - Hades' Disquotheqe - headache edition" from D3DCompile:
Code: [Select]
Error compiling ps_4_0_level_9_3 composite shader:
Shader@0x000000D42B382040(187,2-78): warning X3206: implicit truncation of vector type
Shader@0x000000D42B382040(195,1-41): warning X3206: implicit truncation of vector type
Shader@0x000000D42B382040(197,7-60): warning X3206: implicit truncation of vector type
Shader@0x000000D42B382040(200,8-52): warning X3206: implicit truncation of vector type
Shader@0x000000D42B382040(207,35-45): warning X3206: implicit truncation of vector type
Shader@0x000000D42B382040(207,8-73): warning X3206: implicit truncation of vector type
Shader@0x000000D42B382040(208,33-41): warning X3206: implicit truncation of vector type
Shader@0x000000D42B382040(215,1-67): warning X3206: implicit truncation of vector type
Shader@0x000000D42B382040(233,16-59): warning X3206: implicit truncation of vector type
Shader@0x000000D42B382040(237,15-52): warning X3206: 'dot': implicit truncation of vector type
internal error: blob content mismatch between level9 and d3d10 shader

This last one above is intermittent and doesn't show up always. I don't know what this one means. For reference, here is the exact string being passed to the HLSL compiler with all of the setup code before the preset shader code (comments are stripped before getting passed to the compiler as below):
Code: [Select]
#define M_PI 3.14159265359
#define M_PI_2 6.28318530718
#define M_INV_PI_2 0.159154943091895

float4 rand_frame; 
float4 rand_preset;
float4 _c0; 
float4 _c1, _c2, _c3, _c4;
float4 _c5; 
float4 _c6; 
float4 _c7; 
float4 _c8; 
float4 _c9; 
float4 _c10;
float4 _c11;
float4 _c12;
float4 _c13;
float4 _qa; 
float4 _qb; 
float4 _qc; 
float4 _qd; 
float4 _qe; 
float4 _qf; 
float4 _qg; 
float4 _qh; 


float4x3 rot_s1;
float4x3 rot_s2;
float4x3 rot_s3;
float4x3 rot_s4;

float4x3 rot_d1;
float4x3 rot_d2;
float4x3 rot_d3;
float4x3 rot_d4;
float4x3 rot_f1;
float4x3 rot_f2;
float4x3 rot_f3;
float4x3 rot_f4;
float4x3 rot_vf1;
float4x3 rot_vf2;
float4x3 rot_vf3;
float4x3 rot_vf4;
float4x3 rot_uf1;
float4x3 rot_uf2;
float4x3 rot_uf3;
float4x3 rot_uf4;

float4x3 rot_rand1;
float4x3 rot_rand2;
float4x3 rot_rand3;
float4x3 rot_rand4;

#define time _c2.x
#define fps _c2.y
#define frame _c2.z
#define progress _c2.w
#define bass _c3.x
#define mid _c3.y
#define treb _c3.z
#define vol _c3.w
#define bass_att _c4.x
#define mid_att _c4.y
#define treb_att _c4.z
#define vol_att _c4.w
#define q1 _qa.x
#define q2 _qa.y
#define q3 _qa.z
#define q4 _qa.w
#define q5 _qb.x
#define q6 _qb.y
#define q7 _qb.z
#define q8 _qb.w
#define q9 _qc.x
#define q10 _qc.y
#define q11 _qc.z
#define q12 _qc.w
#define q13 _qd.x
#define q14 _qd.y
#define q15 _qd.z
#define q16 _qd.w
#define q17 _qe.x
#define q18 _qe.y
#define q19 _qe.z
#define q20 _qe.w
#define q21 _qf.x
#define q22 _qf.y
#define q23 _qf.z
#define q24 _qf.w
#define q25 _qg.x
#define q26 _qg.y
#define q27 _qg.z
#define q28 _qg.w
#define q29 _qh.x
#define q30 _qh.y
#define q31 _qh.z
#define q32 _qh.w

#define aspect _c0
#define texsize _c7
#define roam_cos _c8
#define roam_sin _c9
#define slow_roam_cos _c10
#define slow_roam_sin _c11
#define mip_x _c12.x
#define mip_y _c12.y
#define mip_xy _c12.xy
#define mip_avg _c12.z
#define blur1_min _c6.z
#define blur1_max _c6.w
#define blur2_min _c13.x
#define blur2_max _c13.y
#define blur3_min _c13.z
#define blur3_max _c13.w
#define GetMain(uv) (tex2D(sampler_main, uv).xyz)
#define GetPixel(uv) (tex2D(sampler_main, uv).xyz)
#define GetBlur1(uv) (tex2D(sampler_blur1, uv).xyz * _c5.x + _c5.y)
#define GetBlur2(uv) (tex2D(sampler_blur2, uv).xyz * _c5.z + _c5.w)
#define GetBlur3(uv) (tex2D(sampler_blur3, uv).xyz * _c6.x + _c6.y)

#define lum(x) (dot(x, float3(0.32, 0.49, 0.29)))
#define tex2d tex2D
#define tex3d tex3D


texture PrevFrameImage;
sampler2D sampler_main = sampler_state { Texture = <PrevFrameImage>; };
sampler2D sampler_fc_main = sampler_state { Texture = <PrevFrameImage>; };
sampler2D sampler_pc_main = sampler_state { Texture = <PrevFrameImage>; };
sampler2D sampler_fw_main = sampler_state { Texture = <PrevFrameImage>; };
sampler2D sampler_pw_main = sampler_state { Texture = <PrevFrameImage>; };
#define sampler_FC_main sampler_fc_main
#define sampler_PC_main sampler_pc_main
#define sampler_FW_main sampler_fw_main
#define sampler_PW_main sampler_pw_main


sampler2D sampler_noise_lq;
sampler2D sampler_noise_lq_lite;
sampler2D sampler_noise_mq;
sampler2D sampler_noise_hq;
sampler3D sampler_noisevol_lq;
sampler3D sampler_noisevol_hq;
float4 texsize_noise_lq;
float4 texsize_noise_lq_lite;
float4 texsize_noise_mq;
float4 texsize_noise_hq;
float4 texsize_noisevol_lq;
float4 texsize_noisevol_hq;


sampler2D sampler_blur1;
sampler2D sampler_blur2;
sampler2D sampler_blur3;
 #define rad _rad_ang.x
#define ang _rad_ang.y
#define uv _uv.xy
#define uv_orig _uv.xy
#define hue_shader _vDiffuse.xyz
sampler sampler_pw_noise_lq;
static float quality = 2, depth = q31;
float3 neu, rsl, rsl2, rsl3, ret1, screen3, back,lcol, sky;
float2 uv0, uv1, uv2, uv4;
float  lprof,lprof2,m,n,dist,cloud,mask, shadow, mask1,lmask,leaves,clshadow,gmask;
static float lav_gnd = 0;
static const float anz = 3;
static float2 mov = float2 (q5,q6);

static float3 t = float3(q14,q15,q16);
static float3 s = float3(q17,q18,q19);
static float3 ts = -cross(s,t);
static float3 pos = float3 (q11,q12,q13);

float3 project (float3 pos, float dist) {
  float z;
  z = dist/mul(cross(ts,-t),screen3) *(1-lav_gnd);
  gmask = (z <= 0)*(z >= -8);
  return gmask* float3(mul(float2x3(ts,t),cross(pos,screen3))*z/256,-z);}

float3 lproject (float3 pos, float dist) {
  float z;
  z = dist/mul(cross(ts,-t),screen3) *(1-lav_gnd) ;
  return (z<=0)*(z>=-4)* float3(mul(float2x3(ts,t),cross(pos,screen3))*z/256,-z);}

float noise2 (float2 uvi)
{return 1*(tex2D (sampler_noise_hq,uvi) + 0*tex2D (sampler_noise_hq,uvi*4)/4);}

           void PS( float4 _vDiffuse : COLOR, float2 _uv : TEXCOORD0, float2 _rad_ang : TEXCOORD1, out float4 _return_value : COLOR0 )
 {    float3 ret = 0;
uv0 = uv;
screen3 = float3 ((uv-.5)*aspect.xy,1);


lav_gnd = tex2D (sampler_noise_hq,uv)*.03;
rsl3 = lproject(pos,1.5) + float3 (q29,-time/118,0) + float3 (mov,0);
float glmask = tex2D (sampler_pw_noise_lq,rsl3.x*.004) >= .3;
uv2 = rsl3.xy*16;
uv2.y += tex2D (sampler_pw_noise_lq,uv2.x/256).g*-2*time;
float3 noise = 8*tex2D (sampler_pw_noise_lq,uv2/256);
lmask = noise.g >= 7.; lmask *= glmask;
uv2 = frac(uv2);
float lside = sin((noise.b-8)*2*time+q32);
float lsize = 3*(noise.g-6);
leaves = lmask*lsize *(3+frac(4*uv2.x/uv2.y))/4
        -26*length((uv2-.5)*float2(1,2/lside));
lcol = (1+tex2D (sampler_noise_hq,uv2/8+noise))* float3 (.8+lside/4,.5,0);;
lcol -= tex2D (sampler_noise_hq,uv2+noise).r*.25;
leaves = saturate(leaves);


lav_gnd = 0;
rsl = project (pos, 1)+float3 (time*.006,.6,0);
back = saturate(1-rsl.y);
cloud = saturate(noise2(rsl.xy/8*float2(1,4))-.4)*saturate(.5+back);
back *= float3(.7,.77,.96);
sky = lerp(back,2*cloud,cloud/2);


ret1 = sky;
lprof2 = 0;
for (n=anz; n >= 1; n--) {
  dist = (n); lav_gnd = 0;  mov += n/anz;
  for (m=1; m <= quality; m++) {
    rsl = project (pos, dist)+float3 (mov,0);
    lprof =  .5-lum(GetBlur1(frac(rsl.xy)));
    lav_gnd -= lprof/quality*depth/rsl.z;
  }

  rsl = project (pos, dist)+float3 (mov,0) ;
  rsl2 = project (pos, dist)+float3 (0,0,0);
  int first = (n==1);
  if (!first) {shadow = saturate(4*GetPixel(frac(rsl2.xy))) ;}
  neu = GetPixel(frac(rsl.xy));
  float  dista = length(rsl.xy)*.001;
  mask = saturate(16/dist*lum(neu))*gmask;
  neu *= 1-.5*lum(tex2D (sampler_noise_lq,rsl.xy*4));
  clshadow = clamp (q20*1.6-noise2(rsl.xy*float2(.02,.1)+float2(time*.01,0)),.2,1);
  neu *= (1-shadow*.5* (!first))*clshadow;


  neu = lerp(back, neu, saturate(5-rsl.z));
    ret1 = lerp(ret1,neu,mask) ;
}

rsl = project (pos, dist)+float3 (mov+lprof/2,0);

ret1 = lerp(ret1,leaves*(1-shadow/2)*clshadow*lcol, leaves*.5*saturate(!mask));


ret = ret1;


     _return_value = float4(ret.xyz, _vDiffuse.w);
}

But through some trial and error, it appears the correct fallback is to use plain ps_4_0:
  • fxc.exe /nologo /Gec /E PS /T ps_2_a test.hlsl --> Passes compile but fails in DirectX 11.
  • fxc.exe /nologo /Gec /E PS /T ps_4_0_level_9_3 test.hlsl --> Fails compile with the error above.
  • fxc.exe /nologo /Gec /E PS /T ps_4_0 test.hlsl --> Passes compile and works fine with DirectX 11.

I'll test this theory a bit more and make a release if it pans out. However, the issue with the function/variable name collision and the unsupported double type is on the preset authors. And given how simple to verify the preset shader code is it is a shame that they are not tested more thoroughly (looks fine, ship it mentality).
Even though the errors say ps_4_0_level_9_3, I attempt to compile the shaders using the level given by the preset first and then try ps_4_0_level_9_3.

Re: foo_vis_milk2

Reply #165
Thanks for the detailed response. I am not going to pretend I know anything about graphics programming, shaders etc, it's all greek to me. I just shared what I noticed as an end user, but I see what you mean about compatibility issues and lack of thorough/methodological testing.

I download presets from the winamp forum which while not as active as it used to be still has new content every now and then. Martin (or Nitorami as he's known on the forum) is one of the most active members and his presets are known for their creativity, earning the praise of the Milkdrop creator Ryan Geiss. He's regularly seen helping other preset authors so maybe it'll be fruitful sharing this over there--if it's worth your time that is; you have already done everyone a huge favour by bringing Milkdrop to 64-bit Foobar2000.

Re: foo_vis_milk2

Reply #166
I download presets from the which while not as active as it used to be still has new content every now and then. Martin (or Nitorami as he's known on the forum) is one of the most active members and his presets are known for their creativity, earning the praise of the Milkdrop creator Ryan Geiss.
Thanks for the pointers. I have not been into that forum in years. I'll check it out. Maybe I misjudged Martin prematurely.

I've done a bit more research and think I have the proper way to achieve maximum shader compatibility. The downside is it requires bumping the minimum Direct3D feature level from 9_1 to 10_0 (still using DirectX 11) to keep everything consistent. I need to look into whether the tradeoff is worth it. To help that, if anyone here has graphics hardware older than 16 or so years in active use, yell! These would become the oldest "supported" devices:
  • ATI Radeon HD 2000
  • nVidia GeForce 8/9
  • Intel G965M Express Chipset
  • Intel HD Graphics "Arrandale/Clarkdale"

Re: foo_vis_milk2

Reply #167
when i install this into foobar components, it runs sometimes and other times it crashes. it just crashes foobar. what i usually do is make a visualization tab, foobar is 2.24.1 and running on windows 11. does anyone think its something to do with the 3d graphics? i do also have project M visualizer running and that never crashes.

Re: foo_vis_milk2

Reply #168
Hello!
I have Foobar2000 V2.24.2 X64 and FOO_VIS_MILK2 0.3.1.0
 The problem is that the full screen shows on the 1st monitor.
I'm trying to solve this through the Flowin 0.2.2 plugin
 Everything is almost good, opens on a full screen on the 2 monitor, but often falls. Even when you call the assigned key, the player is falling. Well, after closing the full Milkdrop screen in the player interface, it becomes static.

Re: foo_vis_milk2

Reply #169
foo_vis_milk2 is a foobar2000 component that ports Winamp's MilkDrop 2 music visualizer. In addition, I have updated rendering from the original DirectX 9 to DirectX 11. Thus, it no longer requires any additional components to run and includes a 64-bit DLL.

It is available in the components repository.

Enjoy!
can you do goom (version 2k4) next?
source code is also available on sourceforge.

Re: foo_vis_milk2

Reply #170
New release: 0.3.2. Sorry it was longer than I would have liked. Took a bit to make sure that displaying the shader compile errors didn't crash the entire application.

Main changes:
  • Improve preset shader compatibility
  • Add error message on failed shader compile
  • Display shader compiler error messages in the GUI
  • Update foobar2000 SDK to 2025-03-07


Re: foo_vis_milk2

Reply #172
@oops

When using more than one monitor and viewing milkdrop fullscreen, clicking the mouse button on the other monitor brings milkdrop back out of fullscreen. Also when using milkdrop in its own window and dragging it to the other monitor for fullscreen viewing, clicking the mouse button on the other monitor again brings milkdrop back out of fullscreen.

Does anyone else notice this or is it on my end?

Thanks for the continued support its very much appreciated, i enjoy your components immensely!

 

Re: foo_vis_milk2

Reply #173
When using more than one monitor and viewing milkdrop fullscreen, clicking the mouse button on the other monitor brings milkdrop back out of fullscreen. Also when using milkdrop in its own window and dragging it to the other monitor for fullscreen viewing, clicking the mouse button on the other monitor again brings milkdrop back out of fullscreen.

Does anyone else notice this or is it on my end?

Thanks for the continued support its very much appreciated, i enjoy your components immensely!
Completely missed your first post on this, sorry. I root caused the reason for the toggle out of fullscreen on losing focus. Made the equivalent changes in both VU Meter and MilkDrop for their next release. When on its own window, I still need to track down why on VU Meter returning from fullscreen, the component is fully reset (blank window).

From a limited amount of testing, the Default UI versions work as expected. Columns UI has a minor quirk where it hides the panel when it returns from fullscreen (if using double-click) but otherwise also seems to behave as expected.

And thank you for the compliment :)