Skip to main content

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

0 Members and 1 Guest are viewing this topic.
  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
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.
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.

  • TomBarlow
  • [*][*][*][*][*]
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.

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
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.
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.

  • (Sly)
  • [*]
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.99.5 -V0

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
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.
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.

  • (Sly)
  • [*]
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.
  • Last Edit: 09 January, 2010, 03:50:28 AM by (Sly)
LAME 3.99.5 -V0

  • kode54
  • [*][*][*][*][*]
  • Administrator
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.

  • Hamallainen
  • [*][*][*]
foo_wave_seekbar
Reply #157
No more flickering with gdi. Thanks

  • fuflo
  • [*][*][*]
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...

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
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);
  • Last Edit: 11 January, 2010, 12:35:43 AM by Zao
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.

  • fuflo
  • [*][*][*]
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

  • Gapkiller
  • [*][*][*]
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

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
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.
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.

  • Gapkiller
  • [*][*][*]
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!
  • Last Edit: 09 January, 2010, 05:13:53 PM by Gapkiller

  • Hancoque
  • [*][*][*][*]
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.

  • boombaard
  • [*][*][*][*]
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

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
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.
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.

  • fuflo
  • [*][*][*]
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
  • Last Edit: 10 January, 2010, 06:41:39 AM by fuflo

  • TomBarlow
  • [*][*][*][*][*]
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

  • boombaard
  • [*][*][*][*]
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)
  • Last Edit: 10 January, 2010, 11:15:17 AM by boombaard

  • aphasia
  • [*][*]
foo_wave_seekbar
Reply #170
Thanks for a very cool component. Kudos Zao!

  • fuflo
  • [*][*][*]
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
  • Last Edit: 10 January, 2010, 11:45:37 AM by fuflo

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
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.
  • Last Edit: 10 January, 2010, 09:19:27 PM by Zao
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.

  • eke
  • [*][*]
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?

  • Zao
  • [*][*][*][*][*]
  • Developer (Donating)
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.
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.