Skip to main content
Topic: foo_wave_seekbar (Read 556275 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: foo_wave_seekbar

Reply #2150
Will foo_wave_seekbar still work with upcoming foobar2000 v1.4 ?

Re: foo_wave_seekbar

Reply #2151
Why not? It works in all 9 published betas of v 1.4.

Re: foo_wave_seekbar

Reply #2152
I thought there are some changes in 1.4 that requires all plugins to get updated!?

Re: foo_wave_seekbar

Reply #2153
Old plugins can work on new versions of foobar but new versions of plugins can't work on old version of foobar.
foobar2000 plays music

Re: foo_wave_seekbar

Reply #2154
To my knowledge, there are no compatibility breaks.
It's the other way around, if you leverage functionality in the SDK that requires 1.4 in components, they won't work in older foobars.

If I ever get around updating it, it may end up using the new functionality. You should keep your foobars updated anyway, and if there's something holding you back, let Peter know.
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.

Re: foo_wave_seekbar

Reply #2155
Ok. Thanks!

Re: foo_wave_seekbar

Reply #2156
The current SDK can be configured to produce either v1.4+ components or v1.3+ components. Configuring the SDK for v1.3+ disables SDK features that specifically require v1.4+ to work.

Furthermore, the v1.4 series are compatible with all components made for the v1.3 series.

Re: foo_wave_seekbar

Reply #2157
Ok, thanks for the clarification!

Re: foo_wave_seekbar

Reply #2158
Any chance of implementing essentially a user-defined vertical axis scaler for foo_wave_minibar?

My current foo_wave_seekbar is on the left (the one im currently using) and minibar on the right:


Notably the former is off center with a code I picked up somewhere in this topic, then (I think) slightly modified it to stretch out further. The result is that minibar's waveform produces a consistently smaller (less tall) image. I would prefer if it occupied more of its panel with actual content for aesthetical reasons. I don't care if this might result in clipping. I would only increase it by lets say 5% so the majority of tracks would roughly fill the entire window height-wise, eliminating the unused whitespace.

The code im currently using in foo_wave_seekbar for reference:
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();
}
}

Re: foo_wave_seekbar

Reply #2159
I just released a new version of minibar (mod) component that has the ability to scale the waveform. The default selection contains real size scale and a setting to normalize the waveform and you can manually type a scale value from 0.1 to 10.0.

Re: foo_wave_seekbar

Reply #2160
The best way of handling feature requests - waiting for Case to bite on the bait with his mod.  :))
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.

Re: foo_wave_seekbar

Reply #2161
Thanks for the update! Seems to do all I wanted.

Re: foo_wave_seekbar

Reply #2162
Hello, I haven't read through the entire thread but I'd be surprised if this hasn't been requested already:

Reverse scroll wheel option please. I find that it's the exact opposite direction of what I'm used to.

Re: foo_wave_seekbar

Reply #2163
Nighted: Which component would this be for? The thread kind of covers both my foo_wave_seekbar, my foo_wave_minibar and Case's Minibar mod.
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.

Re: foo_wave_seekbar

Reply #2164
Case's mod should have separate thread to avoid confusions.

Re: foo_wave_seekbar

Reply #2165
I made a new thread. Not sure if it would be a good idea for a mod to move related posts there. The new thread is here.

Re: foo_wave_seekbar

Reply #2166
Hello Everyone!

Dear Zao and Case,
Thank you for the Components Waveform Seekbar and Waveform Minibar (mod). It is very important for us, ordinary users such as me.
That gives us freedom of choice design of our favorite fb2k (infinite thanks to Peter for his great project).
Now let me ask, why panels Waveform Seekbar and Waveform Minibar (mod) are "silent" when I use a stream radio or foo_youtube stream?
While other visualizations are working.
Can this be somehow corrected?
If this isn't possible, then I suggest to add Spectrogram visualization mode for this panels (as for DUI see attached pic.) when work with a stream radio or foo_youtube stream.
I will be glad to see your feedback.

Thanks.

Re: foo_wave_seekbar

Reply #2167
But they're not visualizations, they're seekbars.

Re: foo_wave_seekbar

Reply #2168
But they're not visualizations, they're seekbars.
During stream playback - could be as visualization. Why not? There is no Spectrogram visualization in CUI like in DUI.
But OK if that can't be combined.

Re: foo_wave_seekbar

Reply #2169
There is spectrogram in CUI... I use it quite frequently... And it can be combined (spectrogram as image for seekbar, instead waveform) using WSH panel mod. I remember that someone (marc2003?) has posted screenshot and most likely even code how to achieve this. But I don't think that I will be able to find it for you. You need to dig it on your own.

Re: foo_wave_seekbar

Reply #2170
@Sergey77: I've considered for my components to have some sort of "short history" display for streaming audio showing the last 30 seconds or something, but it doesn't fit into the central data idea of self-contained waveforms, nor does any of the operations on it like seeking make sense.

As has been recommended, in CUI you could use some sort of programmable stack component, which would show the seekbar component for seekable tracks, and some other visualisation/element for streaming content.
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.

 

Re: foo_wave_seekbar

Reply #2171
There is spectrogram in CUI... I use it quite frequently...
I meant Specrogram as item layout (or as item of toolbars) of CUI (i.e. not popup window).
And it can be combined (spectrogram as image for seekbar, instead waveform) using WSH panel mod. I remember that someone (marc2003?) has posted screenshot and most likely even code how to achieve this. But I don't think that I will be able to find it for you. You need to dig it on your own.
@EpicForever, thanks for the support and the desire to help! Don't need to spend your time for finding, of course.
I think that if developers want they will create it someday, and we will just wait ;)
In general, this idea came to me only because the panels (Waveform Seekbar and Waveform Minibar (mod)) look "empty" during playback of a stream, and I don't like it, so I suggested. No practical good from this I didn't think to get, only for fb2k design.

@Sergey77: I've considered for my components to have some sort of "short history" display for streaming audio showing the last 30 seconds or something, but it doesn't fit into the central data idea of self-contained waveforms, nor does any of the operations on it like seeking make sense.

As has been recommended, in CUI you could use some sort of programmable stack component, which would show the seekbar component for seekable tracks, and some other visualisation/element for streaming content.
@Zao, thank you for your attention, comment and recommendation.

Hero Members, I was very glad to see your replies!

Best regards.


 
SimplePortal 1.0.0 RC1 © 2008-2018