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

foo_wave_seekbar

Reply #1525
I've been using this component for over 3.5 years now. The last time I posted in this thread was like in April 2010.

The last time I updated this component was on version 0.2.12 (2010/04/24).

(Yes, I know I should probably update my components more regularly)

Anyway, I just updated to 0.2.40 and purged my old wavecache.db file, and I was really impressed with how ridiculously fast waveform analysis is now. I assume this is due to 0.2.30 (2013/03/22).

ANYWAY, I just wanted to say thanks after all these years. Bye.

foo_wave_seekbar

Reply #1526
Hi, I'm using a very old beta of waveseekbar on Foobar 1.1.11 or something, after zao fixed something back in 2010 or 2011, and I had no problems since. I'm still not having problems. But I just tested on another machine the latest foobar and waveseekbar because I felt it was time to test and eventually update my main system (I have tested a newer than 1.1.11 of foobar some time ago and I found it buggy so I decided to stick with 1.1.11 - you know, if it ain't broken...).
I see waveseekbar no longer processes the next song in the list - I listen to a song (10-20 seconds so WS has the time to process the next song), and then advance to the next song, and I see the delay until WS processes it and shows its wave. Why this change, or it is a bug? I'm sorry, I went through the last few pages but I don't seem to find anything related.

foo_wave_seekbar

Reply #1527
I see waveseekbar no longer processes the next song in the list - I listen to a song (10-20 seconds so WS has the time to process the next song), and then advance to the next song, and I see the delay until WS processes it and shows its wave. Why this change, or it is a bug? I'm sorry, I went through the last few pages but I don't seem to find anything related.


He made this change in 0.2.37:

0.2.37 (2013/05/13)

foo_wave_seekbar

Reply #1528
It's nice to see that others remember more what I've done with the component than I do 

I don't recall if I had a rationale for dropping it when I moved the rescanning to a central entity instead of in each of the waveform instances. Right now, I'd probably ret-con it with "it probably made the scan of the current track slower, and might've interfered with other components".

If you care about always having waveforms, there's always the explicit Extract command.
Stay sane, exile.

foo_wave_seekbar

Reply #1529
No, it's not a big deal anyway, but I intend to follow my tested method - it ain't broken and I won't push it for now  .
You say it maight have made scanning slower, but above another guy said he feels it faster than before.. (I find it maybe faster..)
Anyway, I'll give this a second thought and test.

foo_wave_seekbar

Reply #1530
Maybe it's been asked and answered but anyhoo how can i make it wider about the same width as the soundcloud?

 

foo_wave_seekbar

Reply #1531
yurithedragonhalf: Are you talking about the vertical extents of the waveform inside the display?
The generic way to do that is to use the Direct3D9 mode and in the effect use TRACKMAGNITUDE's components to find out how low/high the peaks are, as described in an earlier post. There's also a REPLAYGAIN semantic you can use to determine the RG amounts you may need to compensate with to get a perceptual full-scale display.

Personally I don't bother with the RG compensation and prefer to see the waveform at its natural extents, maybe just scaled down if it clips some.

Anyway, I've got a soundcloud-like asymmetric look that scales the waveform to the maximum peak, offset from the center-line and with a slight gradient behind.


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;
float3 track_magnitude  : TRACKMAGNITUDE;

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 evaluate( float2 tc, float cursorPos )
{
// 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;
bool played = cursorPos < tc.x;
float4 inside_color = played ? textColor : highlightColor;
float4 bgColor = backgroundColor;

float4 wave = outside
? bgColor
: inside_color
;

return saturate(wave);
}

float4 reflect_evaluate( float2 tc, float cursorPos)
{
float baseline = -1.0/3.0;
float low_unscale = 3.0/2.0;
float high_unscale = 3.0/4.0;
bool mirrored = tc.y < baseline;
if (mirrored) {
tc.y = baseline - tc.y;
tc.y = tc.y * low_unscale;
}
else {
tc.y = tc.y - baseline;
tc.y = tc.y * high_unscale;
}
float mag = max(-track_magnitude.r, track_magnitude.g);
if (mag > 0.95) {
tc.y = lerp(0, mag/0.95, tc.y);
}
float boost = mirrored ? 1.3 : 1.0;
float gradient = lerp(0.7, 1.0, tc.y);
return boost * gradient * evaluate(tc, cursorPos);
}

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 = reflect_evaluate(input.tc, cursorPos);
c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
c0 = bar(seekPos,  input.tc, selectionColor, c0, seekWidth,    seeking      );
return c0;
}

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

Edit: made reflect_evaluate saturate it's output, otherwise the position/seek-bar got lopsided.
Stay sane, exile.

foo_wave_seekbar

Reply #1532
Zao, any chance you can get the component to work with cdda:// entries? It's not showing any waveform (I have "analyze tracks not in the media library" enabled). Thanks.

---looks like it was already brought up earlier. Sorry. It's a shame that won't work though!

foo_wave_seekbar

Reply #1533
The core problem with CDDA is that it's impossible to decode more than one track at the same time, thanks to that reads from optical media is serial in nature.
This means that anything that causes concurrent decoding is impossible, which means that neither automatic scanning while playing (because you are playing) nor explicit scanning (as that decodes multiple tracks at once) is possible.
In order for it to be possible at all, the analysis would have to be aware of what kind of input is currently playing and ensure that no other analysis thread is currently touching the device, which is way more complexity than I have been bothered to handle.

Of course, most of the restrictions above are moot if you play all your CDDA from ISOs, but I don't really consider that a common valid use case, as you by then might as well just keep regular boring lossless files.
Stay sane, exile.

foo_wave_seekbar

Reply #1534
I think that reason for not scanning files on optical media is obvious, well justified and thus there should be no discussion about that. This is media storage induced limitation. Of course there could be discussion another "Advanced preferences" checkbox for those who don't care about their ODDs, but I think that properly written application should avoid any damage to the hardware - and that's why even such checkbox should never exist.

foo_wave_seekbar

Reply #1535
It might be possible to get the audio data from the visualization API as the song plays, but I imagine it would be more than a little cumbersome to fit this into the code.

foo_wave_seekbar

Reply #1536
Cute idea, but I definitely do not want to touch the weirdo vis interfaces with their polling-of-data and other oddities.
Stay sane, exile.

foo_wave_seekbar

Reply #1537
I've updated component from 0.2.27.0 to 0.2.40.0 and now I experience full UI freeze on foobar start. Foobar does not crash, it can even respond to Windows 7 taskbar context menu actions (like Play) but foobar itself is unresponsive. Removing component or downgrading to 27 version fixes an issue.
I would be grateful for any help on making new version work. Thanks!

foo_wave_seekbar

Reply #1538
What about version 0.2.41? No download available yet?

foo_wave_seekbar

Reply #1539
Dandruff: Right, it's just the features that I intend to ship with that release, whenever I can get around actually testing it enough. It also includes a bump of Visual Studio version to 2013 RC, so there's untold fun lurking under the surface.
Stay sane, exile.

foo_wave_seekbar

Reply #1540
Ok

foo_wave_seekbar

Reply #1541
SDK/playback_stream_capture.h

Sends you the audio data in chunks, roughly in time with what the user hears. Still real-time, but provides a continuous stream of the data. Of course, it doesn't provide track metadata or track change markers, so you don't know where the audio is coming from any better than if you poll the visualization interface.

foo_wave_seekbar

Reply #1542
Yeah, I'm aware of that interface too, and it's about as unsuitable indeed.
Stay sane, exile.

foo_wave_seekbar

Reply #1543
http://www.hydrogenaudio.org/forums/index....howtopic=102724

As I said in last post I still need to test but it seems that we have some incompatibility between Win 8.1 and wave_seekbar or at least between newest AMD graphic driver and wave_seekbar. I use Sapphire HD 7750 Ultimate graphic card with latest Catalyst drivers (stable release, not the beta one), under Win 8.1 Preview x64.

foo_wave_seekbar

Reply #1544
i think you're barking up the wrong tree. foo_wave_seekbar just happens to the first thing is utilising your GPU after waking from hibernation. i don't see how you can expect Zao to do anything about that. your issue looks to be OS/driver or possibly BIOS related.

you could try another application that uses your GPU immediately after wakeup and see what happens?

foo_wave_seekbar

Reply #1545
The crash is deep inside the AMD drivers when I try to lock a texture after a device reset. The documentation mandates that such operations shall fail gracefully until the device is properly reset.

AMD considers that to be for the weak and instead violently crashes on an internal null pointer. Most GPU vendors are equally incompetent when it comes to resuming from hibernation. Heck, you can trigger stupidity by simply locking a Windows 8 session.

I could "solve" this problem by getting rid of D3D9 and D2D, but I doubt people would be overly happy about it. 
Stay sane, exile.

foo_wave_seekbar

Reply #1546
OK. Thanks for your explanation. I am just reporting the issue. If it's unsolvable then OK I'll try to live with it. Maybe I will have to install foo_jesus
From my point of view it looks like this: In Win7x64, on integrated Radeon HD4200 everything is OK. In Win8.1x64 on "normal" Radeon HD7750 there are crashes... Why the thing that you described happens only on Win8.1? In the end I plan to go back to Win7x64 (probably when 8.1 Preview will expire), so it will take some time before I check how Win7 works with my new graphic card and hibernation...

foo_wave_seekbar

Reply #1547
I have a question. I tend to have a lot of files that i'll listen to once and then delete. I don't add them to the music library. I was wondering if the waveforms still get added to the database, taking up space (not much, but still), or if they're just disposed of after the track is finished or Foobar is closed.

I know i can set it not to scan those tracks at all, but i'd still like to see the waveforms, just not save them.

foo_wave_seekbar

Reply #1548
There's a menu option in "Library -> Waveform Seekbar -> Remove Dead Waveforms" which removes all waveforms for which the track is not present.

The component always stores everything it scans.
Stay sane, exile.

foo_wave_seekbar

Reply #1549
Oh! That's perfect, thanks for the help