Skip to main content

Topic: foo_wave_seekbar (Read 518521 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • mzso
  • [*][*][*][*]
foo_wave_seekbar
Reply #1475
Hi!
This question only a slightly related.
If "someone" installed old versions of directx in hopes of making an old DirectDraw game playable, but getting garbage instead, how would one remove them without breaking never directx installs (9 and up)?

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
foo_wave_seekbar
Reply #1476
In general, a D3D runtime installer should never ruin or touch more recent revisions, just provide the things that are missing or strictly upgrade things that are.
If you've force-clobbered parts of your system, I recommend that you either restore from a known good state, or nuke the OS from orbit. It's the only way to be sure.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

foo_wave_seekbar
Reply #1477
Older versions are available for testing purposes, so if you can find the version change where it stops working it would help me find out if it's something I did and what the reason might be. Make sure you look at the console and see if it succeeds at loading the Direct3D9 frontend or if it's falling back to GDI mode.
Strange, but none of them seem to work. All versions have the same green effect. Console shows, that D3D has loaded successfully. I have no idea what has changed in this computer since then when it was working. It looks like I will have to stick to GDI. Well, nevermind then, sorry for troubling you.

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
foo_wave_seekbar
Reply #1478
daviszarins: Do you get the same green behaviour from running this simple test program? Seekbar spinup test
If executing properly, it should render a simple stereo waveform in a standalone application.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

foo_wave_seekbar
Reply #1479
daviszarins: Do you get the same green behaviour from running this simple test program? Seekbar spinup test
If executing properly, it should render a simple stereo waveform in a standalone application.
Is it 64 bit program or do I have to install some prerequisites because "...test.exe is not a valid Win32 application"?

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
foo_wave_seekbar
Reply #1480
Seems like I built that with the default toolset in VS2012, which means targetting Vista (6.0) and up. It will probably not tell you anything interesting anyway.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

  • j.r.
  • [*]
foo_wave_seekbar
Reply #1481
Seems like I built that with the default toolset in VS2012, which means targetting Vista (6.0) and up. It will probably not tell you anything interesting anyway.


hello zao

i have the same problem with my notebook.  i can't use direct3d 9.0c. i have always a green/grey screen with it like 'nesvariigi'
when i switch to direct2d it skips to gdi. the gdi-mode is the only one that works here. i have a onboard gfx-card
intel  82852/82855 gm/gme graphics controller. as long as i installed wave_seekbar d3d never worked with any version.

the console prints:

Seekbar: taking Direct3D9 path.
Seekbar: Frontend initialized. (but with the green/grey screen)

Seekbar: taking Direct2D1 path.
Seekbar: frontend creation failed: unavailable frontend
Seekbar: taking GDI path.


just for your information
kind regards j.r.
  • Last Edit: 03 July, 2013, 07:05:32 PM by j.r.

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
foo_wave_seekbar
Reply #1482
Version 0.2.40 is out.
It has a lot of robustness fixes, GDI painting optimizations, and is built with a new compiler and functionality from its standard library resulting in regaining almost a megabyte of disk footprint.

This is a bit intrusive, so report changed or broken behavior.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
foo_wave_seekbar
Reply #1483
j.r.: Your GPU is a DX7 part, with DX9 support in software. I haven't been able to assemble a machine with a comparable chip to test on. Has the Direct3D frontend ever worked on this configuration?

Direct2D requires around Vista SP2 by definition, so if you're on XP that will never work.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

  • j.r.
  • [*]
foo_wave_seekbar
Reply #1484
j.r.: Your GPU is a DX7 part, with DX9 support in software. I haven't been able to assemble a machine with a comparable chip to test on. Has the Direct3D frontend ever worked on this configuration?

dear zao

as far as i know, no!  but to be sure, i tried some of the older revisions tonight, 0.2.38, 36, 34, 32, 30, 29, 21, and 15
and for any of them only the gdi-mode works here. it's not a problem and ok for me, i can life with the gdi-mode.

Direct2D requires around Vista SP2 by definition, so if you're on XP that will never work.

ahh! ok! i didn't know that . i use win xp sp3 here.

by the way, have you ever seen  the waveform display from edison the waveform-editor available for the fl-studio? 
that's very great and also very nice to handle.
 
thanks a lot and kind regards j.r.


  • Gnx
  • [*]
foo_wave_seekbar
Reply #1485
issue with new v0.2.40 on XP SP2, FB v1.2.8 information pop up:
"Failed to load DLL: foo_wave_seekbar.dll
Reason: La procédure spécifiée est introuvable.  "

FYI "C:\Documents and Settings\xxx\Application Data\foobar2000\user-components\foo_wave_seekbar" contents:
foo_wave_seekbar.dll, frontend_direct2d.dll, frontend_direct3d9.dll, msvcp120.dll, msvcr120.dll, SciLexer.dll

  • Dandruff
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1486
issue with new v0.2.40 on XP SP2, FB v1.2.8 information pop up:


Can't confirm this on german WinXP SP3. Working fine here.


One thing that's ugly in 0.2.40: In GDI mode, internet streams are now just displaying a black background. Doesn't look nice. Please leave it white!

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
foo_wave_seekbar
Reply #1487
v0.2.40 on XP SP2

You seem to be running a Windows XP with an unsupported service pack. Both Visual Studio 2012 (v110_xp) and Visual Studio 2013 (v120_xp) target only supported versions (SP3 for x86, SP2 for x64), and in less than a year, none at all.

Quote from: Microsoft link=msg=0 date=
For these operating systems, the supported versions are Windows XP Service Pack 3 (SP3) for x86, Windows XP Service Pack 2 (SP2) for x64, and Windows Server 2003 Service Pack 2 (SP2) for both x86 and x64.

You all are aware that XP will die a fiery support death in April 2014, right, whether you like it or not? That means no security updates, no updates, and no pity. I have no idea how to handle this imminent doomsday, as there's the long tail of people that for their own reasons can't or won't migrate to a less doomed OS.

All I know is that it won't be pretty.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

  • Gnx
  • [*]
foo_wave_seekbar
Reply #1488
@ Zao
I know that XP SP2 is not really up to date ... 
don't matter, back to v0.2.39.6, it works fine

many thanks for all your work
regards

  • EpicForever
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1489
I got a question. I completely don't understand the code that is under D3D configuration - I am complete noob in this matter. So I wanted to know if using specific variables in this code I will be able to normalize amplitude of waveform but ONLY when I use downmixed view? Here is the code that suits my needs when I don't need downmixing:

Code: [Select]
texture tex : WAVEFORMDATA;

sampler sTex = sampler_state
{
Texture = (tex);
MipFilter = LINEAR;
MinFilter = LINEAR;
MagFilter = LINEAR;

   AddressU = Clamp;
};

struct VS_IN
{
float2 pos : POSITION;
float2 tc : TEXCOORD0;
};

struct PS_IN
{
float4 pos : SV_POSITION;
float2 tc : TEXCOORD0;
};


float4 backgroundColor : BACKGROUNDCOLOR;
float4 highlightColor  : HIGHLIGHTCOLOR;
float4 selectionColor  : SELECTIONCOLOR;
float4 textColor      : TEXTCOLOR;
float cursorPos        : CURSORPOSITION;
bool cursorVisible    : CURSORVISIBLE;
float seekPos          : SEEKPOSITION;
bool seeking          : SEEKING;
float4 replayGain      : REPLAYGAIN; // album gain, track gain, album peak, track peak
float2 viewportSize    : VIEWPORTSIZE;
bool horizontal        : ORIENTATION;
bool flipped          : FLIPPED;
bool shade_played      : SHADEPLAYED;

PS_IN VS( VS_IN input )
{
PS_IN output = (PS_IN)0;

float2 half_pixel = float2(1,-1) / viewportSize;
output.pos = float4(input.pos - half_pixel, 0, 1);

if (horizontal)
{
output.tc = float2((input.tc.x + 1.0) / 2.0, input.tc.y);
}
else
{
output.tc = float2((-input.tc.y + 1.0) / 2.0, input.tc.x);
}

if (flipped)
output.tc.x = 1.0 - output.tc.x;

return output;
}

float4 bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show )
{
float dist = abs(pos - tc.x);
float4 c = (show && dist < width)
? lerp(fg, bg, smoothstep(0, width, dist))
: bg;
return c;
}

float4 faded_bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show, float vert_from, float vert_to )
{
float dist = abs(pos - tc.x);
float fluff = smoothstep(vert_from, vert_to, abs(tc.y));
float4 c = show
? lerp(fg, bg, max(fluff, smoothstep(0, width, dist)))
: bg;
return c;
}

// #define BORDER_ON_HIGHLIGHT

float4 played( float pos, float2 tc, float4 fg, float4 bg, float alpha)
{
float4 c = bg;
float2 d = 1 / viewportSize;
if (pos > tc.x)
{
#ifdef BORDER_ON_HIGHLIGHT
if (tc.x < d.x || tc.y >= (1 - d.y) || tc.y <= (2 * d.y - 1))
c = selectionColor;
else
#endif
c = lerp(c, fg, saturate(alpha));
}
return c;
}

float4 evaluate( float2 tc )
{
// alpha 1 indicates biased texture
float4 minmaxrms = tex1D(sTex, tc.x);
minmaxrms.rgb -= 0.5 * minmaxrms.a;
minmaxrms.rgb *= 1.0 + minmaxrms.a;
float below = tc.y - minmaxrms.r;
float above = tc.y - minmaxrms.g;
float factor = min(abs(below), abs(above));
bool outside = (below < 0 || above > 0);
bool inside_rms = abs(tc.y) <= minmaxrms.b;

#if 1
float4 bgColor = backgroundColor;
#else
float a = viewportSize.x / viewportSize.y;
float2 aspect = horizontal ? float2(a, 1) : float2(1/a, 1);
float2 tcBg = float2(tc.x, -tc.y / 2 + 0.5) * aspect;
float4 bgColor = tex2D(sTexBg, tcBg);
#endif

float4 wave = outside
? bgColor
: lerp(bgColor, textColor, 4.0 * factor+0.8);

return saturate(wave);
}

float4 PS( PS_IN input ) : SV_Target
{
float dx, dy;
if (horizontal)
{
dx = 1/viewportSize.x;
dy = 1/viewportSize.y;
}
else
{
dx = 1/viewportSize.y;
dy = 1/viewportSize.x;
}
float seekWidth = 2.5 * dx;
float positionWidth = 2.5 * dx;

float4 c0 = evaluate(input.tc);
c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
c0 = bar(seekPos,  input.tc, selectionColor, c0, seekWidth,    seeking      );
if (shade_played)
c0 = played(cursorPos, input.tc, highlightColor, c0, 0.3);
return c0;
}

technique10 Render10
{
pass P0
{
SetGeometryShader( 0 );
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetPixelShader( CompileShader( ps_4_0, PS() ) );
}
}

technique Render9
{
pass
{
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_2_0 PS();
}
}

If I'm not wrong it's just the default code, but one colour mixing/blending setting is tuned: lerp(bgColor, textColor, 4.0 * factor+0.8);

So - is it possible to modify this code to normalize ONLY when downmixed view is turned on?
  • Last Edit: 06 July, 2013, 12:23:36 PM by EpicForever

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
foo_wave_seekbar
Reply #1490
Good for you that I checked the actual thread. Post edits do not appear in the mail notifications.

No, there's not currently any way to find out which channel is currently being shaded and how many channels there are, and if they're the result of downmixing.

I'm a bit reluctant to add semantics for every little thing, as they count to some global limit in the shader, and they might be painful to maintain over time. I'll ponder it.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

  • Dandruff
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1491
One thing that's ugly in 0.2.40: In GDI mode, internet streams are now just displaying a black background. Doesn't look nice. Please leave it white!


Anything to say about this?

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
foo_wave_seekbar
Reply #1492
Noted that, not intended.

Haven't had time to get around looking at it.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

  • Dandruff
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1493
Ok, thanks!

  • EpicForever
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1494
I noted these lines in derty2 code:

   //- - - - - NORMALIZE/RESCALE ALL WAVEFORMS TO FILL PANEL EDGE-TO-EDGE - - - - - - - -
   //Requires "foo_wave_seekbar" version 0.2.34 or higher - see changelog
   //This variation will map the range [-1,1] to [min_peak,max_peak].
   //input.tc.y = (input.tc.y + 1)/2 * (chan_mag.g - chan_mag.r) + chan_mag.r;
   //This variation will map the range [-1,1] to [-largest_peak,largest_peak]
   //input.tc.y = input.tc.y * max(abs(chan_mag.r), abs(chan_mag.g));

I found that basically they do exactly what I want for 5.1 downmixed to 2.0. But even despite I tested  both variations on several files I don't get the difference between them... what is the difference between  [min_peak,max_peak], and  [-largest_peak,largest_peak] ? what is the difference between largest_peak and max_peak?

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
foo_wave_seekbar
Reply #1495

The full blue line is the maximum peak for the track, determined by finding the numerically highest value in the waveform extents.
The full red line is the minimum peak for the track, that is, the lowest (quite likely negative) value in the waveform extents.
The light blue and light red lines are those peaks, reflected around the middle, zero.

Scaling to [minpeak/maxpeak] would map the waveform so that the peaks on both sides would touch the sides of the window.
Scaling to [-largest/largest] would map the waveform so that the peaks of one side would touch the side, and that the zero line remains centered, to avoid a lopsided look.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

  • Dandruff
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1496
0.2.40:

Direct3D 9.0c causes strange high CPU usage (sometimes up to 13% on Intel Core2 Duo E6700 + Geforce GTS450, 1920x1200 pixels) on WinXP SP3 I think. Dispay rate set to 100%. Display = dowmix to mono.


GDI mode seems to be performing much better.

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
foo_wave_seekbar
Reply #1497
I've fixed the black-stream bug, now clearing to the preferred background color instead.
It'll be in a release eventually.

I have yet to find the cause of the phantom position indicator at pixel zero, nor diagnosed any of the reported CPU burn in the D3D9 frontend, the latter due to the lack of 3D acceleration in my development VM.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

  • Axon
  • [*][*][*][*][*]
  • Members (Donating)
foo_wave_seekbar
Reply #1498
i would also like to know where i could find an older version of your plugin. the reason for that is, that i'm running foobar2k with wine on ubuntu linux. starting with some version which i don't exactly remember, foobar started crashing when waveform seekbar was installed. unfortunately, i couldn't find a workaround yet, but i'd love to continue using the plugin.

The only way I can ever find out about these kinds of problems is if I'm told about them, as wine is explicitly ignored by the crash reporting system.

FWIW, version 0.2.34 appears to be the last version which works on my Linux system (Arch x86_64). Everything after that generally crashes on startup.

Also, only GDI mode works; when trying D3D9, I get the console error "DirectX redistributable not found." I installed directx9+d3dx10+d3dx11_43 via winetricks, although I have no earthly idea if any of that is installing what foo_wave_seekbar is looking for.

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
foo_wave_seekbar
Reply #1499
The reason nothing works anymore on Linux is because the Wine people are ... amusingly talented.
There's a lot of assumptions and stubs in the Wine code, resulting in that anything using the C++11 threading primitives like mutexes from Visual Studio 2012 or 2013 will break completely.
You either have to wait for Wine to fix it, which may take an indeterminate amount of time, or I will have to sidestep some bloody clods whose motto seems to be "STUB THE WORLD!".

As for your Direct3D9 troubles, heaven knows. I've never supported manual installation of D3DX.
I do, however, use the February 2010 compiler, which means that you need at a very minimum d3dx9_42, and possibly whichever one down around 33 (31?) that provides the legacy compiler.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.