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

foo_wave_seekbar

Reply #150
However when the computer is Locked (Win+L) and the Foobar window is NOT minimized I get constant 100% cpu usage on my C2D.

Reported in early 0.0.x series, I lose the device and do probably not do the re-acquire test properly.

I think this component is causing problems for me when I listen to radio streams.

Remove the component and see what happens? Also, what protocol; it should completely ignore MMS etc.

is it possible to start playing with double click in the waveform?

Requested already.
Stay sane, exile.

foo_wave_seekbar

Reply #151
If I set the panel to hidden (in columns UI layout prefs) everything is fine. The bad things only happen after listening to the stream for about 5 minutes or more. It's an m3u stream. From what I could see of the console it said it was skipping the stream. It also happens with mms streams. It seems to happen every time I listen to one, but only after a while.

foo_wave_seekbar

Reply #152
As the GDI+ mode is an overnight hack, it may very well be horribly broken.
A quick inspection with Process Explorer tells me I'm leaking GDI handles like crazy. Yay.
Stay sane, exile.

foo_wave_seekbar

Reply #153
Major bug: I was playing Heroes Might & Magic III in fullscreen when i discovered this bug.

On track change (one track ended other started) the playback stopped until i Alt-Tab-ed out from the game, after that playback continued normally. This happened on every tack change. Everybody knows that this is not a CPU speed problem, Heroes III uses very few resources. I'm running Windows XP SP3, DX9C latest, T2390 1.86GHz, 2GB RAM, Intel Mobile 965 Express @ Laptop.
LAME 3.100.1 -V0

foo_wave_seekbar

Reply #154
0.1.8 is out, improving greatly on performance, especially the high load when listening to streams. See changelog for all the changes.
Stay sane, exile.

foo_wave_seekbar

Reply #155
Major bug: I was playing Heroes Might & Magic III in fullscreen when i discovered this bug.

On track change (one track ended other started) the playback stopped until i Alt-Tab-ed out from the game, after that playback continued normally. This happened on every tack change. Everybody knows that this is not a CPU speed problem, Heroes III uses very few resources. I'm running Windows XP SP3, DX9C latest, T2390 1.86GHz, 2GB RAM, Intel Mobile 965 Express @ Laptop.



Bug is gone with 0.1.8. I was using 0.1.4.

Keep up the good work. Waiting for embended data in tags, or datatbase in root of music library. I hope that Peter releases the SDK for writing Default UI elements, for you to be able to create this greate addon as pure toolbar element.
LAME 3.100.1 -V0

foo_wave_seekbar

Reply #156
I hope that Peter releases the SDK for writing Default UI elements, for you to be able to create this greate addon as pure toolbar element.

It already is a UI Element. There is no way for components to add to the toolbar.

foo_wave_seekbar

Reply #157
No more flickering with gdi. Thanks

 

foo_wave_seekbar

Reply #158
regarding the effects:

i have some general knowledge in programming, but not graphical.

how would i go about changing the bar() function to make the bar smaller in vertical size? the reason i'm asking is i'm trying out some designs for foobar with this component and it would look much less blockier if the bar was a little smaller vertically.
i tried hacking the default effect a little to no avail...

foo_wave_seekbar

Reply #159
how would i go about changing the bar() function to make the bar smaller in vertical size? the reason i'm asking is i'm trying out some designs for foobar with this component and it would look much less blockier if the bar was a little smaller vertically.
i tried hacking the default effect a little to no avail...

The following code may be acceptable and will available for use in the default effect in next release. Tweak the last two parameters to the function to indicate from what amplitude the bar should start fading and which amplitude it's fully gone. For fun, also try reversing the order of them, which would give a bar that's hollow towards zero.
Code: [Select]
float4 fade_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 vertical = smoothstep(vert_from, vert_to, abs(tc.y));
    float4 c = show
        ? lerp(fg, bg, max(vertical, smoothstep(0, width, dist)))
        : bg;
    return c;
}

For example, to fade from solid at amplitude 0.3 to 0.8:
Code: [Select]
c0 = faded_bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible, 0.3, 0.8);
Stay sane, exile.

foo_wave_seekbar

Reply #160
hmm.. either i'm doing it wrong or i have no idea..
it doesn't seem to have any effect. i added that function to default seekbar.fx and replaced bar() references with fade_bar() with added values 0.3 and 0.8 where you mentioned and it doesn't seem to have any effect.
also from your description of that function it doesn't seem to be what i actually want..

ps. although as i'm writing this, i had a couple or more beers so i'll check back tommorow with a clear mind

foo_wave_seekbar

Reply #161
feature request:

Please add function to temporarily turn off wave analyzing.
When i make playlists I scroll and click tracks pretty fast so it gets very high on cpu usage...
It would be perfect if it would display only the scrollbar without analyzing!

Thx

foo_wave_seekbar

Reply #162
hmm.. either i'm doing it wrong or i have no idea..
it doesn't seem to have any effect. i added that function to default seekbar.fx and replaced bar() references with fade_bar() with added values 0.3 and 0.8 where you mentioned and it doesn't seem to have any effect.
also from your description of that function it doesn't seem to be what i actually want..


Left to right is (0.3, 0.7), (0.3, 0.35), (0.7, 0.3).
If you've got a seekbar.fx in both your profile and foobar dir, it prefers the profile one. Also, note that .fx files only affect the Direct3D mode, not GDI or Direct2D.

Please add function to temporarily turn off wave analyzing.
When i make playlists I scroll and click tracks pretty fast so it gets very high on cpu usage...
It would be perfect if it would display only the scrollbar without analyzing!

The processing threads run at idle priority, so it should not be horribly noticeable, responsivity-wise.
But yes, an "inhibit enqueueing of new tracks" command might be doable. It'd be tricky to get it to affect work items previously enqueued though.
Stay sane, exile.

foo_wave_seekbar

Reply #163
Quote
The processing threads run at idle priority, so it should not be horribly noticeable, responsivity-wise.
But yes, an "inhibit enqueueing of new tracks" command might be doable. It'd be tricky to get it to affect work items previously enqueued though.


Thank you for considering this. Would be a very helpful feature to me!

foo_wave_seekbar

Reply #164
How is the waveform calculated? Is it just a sum of all channels? I noticed that the channels of a 5.1 file are treated differently. The LFE channel, for example, receives a boost. I'd like to be able to limit the calculation to certain channels or even use only one channel. As most music is in stereo, a two-channel view would also be great. The main reason for me to use this component would be to examine the material as accurately as possible, especially in terms of dynamics compression. That possibility is greatly reduced when viewing only a mono sum as it makes the material look better than it really is.

foo_wave_seekbar

Reply #165
How is the waveform calculated? Is it just a sum of all channels? I noticed that the channels of a 5.1 file are treated differently. The LFE channel, for example, receives a boost. I'd like to be able to limit the calculation to certain channels or even use only one channel. As most music is in stereo, a two-channel view would also be great. The main reason for me to use this component would be to examine the material as accurately as possible, especially in terms of dynamics compression. That possibility is greatly reduced when viewing only a mono sum as it makes the material look better than it really is.

Actually, my girlfriend will love this visualizer. I acquainted her with the Loudness War a while back, and it's helped her identify why she didn't care for some music without really knowing why. Still, it would be nice to have 2 channels, or at least know if the single-wave output is RMSed or summed.
In any case: Thanks Zao

foo_wave_seekbar

Reply #166
The mixdown algorithm is very unscientific.

Code: [Select]
switch (channelCount)
{
case 8:
    frame[0] += frame[6] * sqrt_half;
    frame[1] += frame[7] * sqrt_half;
case 6:
    frame[0] += frame[2] * sqrt_half + frame[4] * sqrt_half + frame[3];
    frame[1] += frame[2] * sqrt_half + frame[5] * sqrt_half + frame[3];
case 2:
    frame[0] += frame[1];
    frame[0] /= 2.0;
    break;
case 4:
    frame[0] += frame[1] + frame[2] + frame[3];
    frame[0] /= 4.0;
}


That is, 7.1ch is mixed to 5.1ch.
5.1ch is mixed to stereo.
Stereo is averaged to mono (which will mislead with phase-skewed channels).
4ch is similarily averaged to mono.
Stay sane, exile.

foo_wave_seekbar

Reply #167
finally found why fade_bar didn't work for me.

from your example:

float4 fade_bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show, float vert_from, vert_to )

should be:

float4 fade_bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show, float vert_from, float vert_to )

and now it works perfectly. thanks

foo_wave_seekbar

Reply #168
Thanks for the latest version, it works well and looks great.

Would a transparent background be possible at all? Or maybe the ability to define a background image? I realise the foreground colour is calculated using the background colour, so maybe not, just thought I'd suggest it

foo_wave_seekbar

Reply #169
Something quite problematic my gf pointed out:
Background: Black
foreground: Red
(hl: darkgreen selection:yellow
Now, if I disable the fg color, the fg (that is, the waveform) becomes white, but it also grows by a significant %age. What's happening there?
(The same thing applies when you change the bg color, btw)

foo_wave_seekbar

Reply #170
Thanks for a very cool component. Kudos Zao!

foo_wave_seekbar

Reply #171
hmm.. i don't know if this is a bug but with d3d, making foobar's window transparent, wave seekbar's bg is black ( and not transparent ). gdi is fine

foo_wave_seekbar

Reply #172
float4 fade_bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show, float vert_from, vert_to )
float4 fade_bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show, float vert_from, float vert_to )

I'm fairly sure that the console should log any effect compilation errors with line and column.

Would a transparent background be possible at all? Or maybe the ability to define a background image? I realise the foreground colour is calculated using the background colour, so maybe not, just thought I'd suggest it

Since early on, I have intended to load any textures referenced by annotations in the effect file, but sadly enough I have not implemented it yet.
An example of such an annotation is line 2 of the default seekbar.fx.

Something quite problematic my gf pointed out:
Background: Black
foreground: Red
(hl: darkgreen selection:yellow
Now, if I disable the fg color, the fg (that is, the waveform) becomes white, but it also grows by a significant %age. What's happening there?
(The same thing applies when you change the bg color, btw)

At the edge of the waveform, the color is bg. To a certain distance inside the waveform, the color is linearly interpolated to fg. Inside of that distance, color continues the interpolation, depending on how b and fg relate to each other.

If bg.r is redder than fg.r, the center will go towards a color without red.
If bg.r is less red than fg.r, it will go towards a full red component.
Likewise for green and blue.

The more similiar bg and fg are, the softer the edge will seem and the less extreme the interior will be.

Note that what you disable is the override of the global colors, not the color itself. It will use whatever you have set in the DUI/CUI global preferences.

hmm.. i don't know if this is a bug but with d3d, making foobar's window transparent, wave seekbar's bg is black ( and not transparent ). gdi is fine

That's expected, and I do not believe that it's solvable, not even with Direct3D9Ex.
Similarily, it will most probably not do the right thing in the unholy Panel Stack of Columns.
Stay sane, exile.

foo_wave_seekbar

Reply #173
is it possible to display 2 wavebars at once for 2 files, in order to compare them to each other?

foo_wave_seekbar

Reply #174
is it possible to display 2 wavebars at once for 2 files, in order to compare them to each other?

No. At least not currently. Maybe when I get around implementing displaying the selected song I can implement a setting to not track the currently playing one.
Stay sane, exile.