Skip to main content
Recent Posts
1
3rd Party Plugins - (fb2k) / Re: foo_wave_seekbar
Last post by Daeron -
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.

Just for the refence the code im using for foo_wave_seekbar:
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();
}
}
3
Support - (fb2k) / Re: Help, Cursor follows playback is misbehaving.
Last post by Jailhouse -
This issue was brought up in the JScript Panel thread last year, or perhaps the year prior. Nobody had a solution, other than to restart fb2k repeatedly until the highlighted track displays where it belongs, which you have already figured out. I hope that Peter can fix this someday.
4
3rd Party Plugins - (fb2k) / Re: foo_youtube
Last post by Skreaxy -
I have xy-VSFilter installed via CCCP and yet it doesn't recognizes it's not installed so I tried installing by the link it's given I do and the componnent says I need to install xy-VSFilter when I have it.
6
Support - (fb2k) / Help, Cursor follows playback is misbehaving.
Last post by TuNk77 -
As the title says, I would like some help with "cursor follows playback" since it is misbehaving.
By misbehaving I mean that "cursor follows playback" does not land the highlighted track in the middle of the playlist, as I expect it to,
the highlighted track is either on the top of the playlist or on the bottom.

Sometimes it helps to restart foobar2000, but it can take several restarts to make it behave normally.

This issue is present in foobar2000 v1.3.17 and v1.4 beta 15.

I did a clean portable install and the issue still persist.

The only component I installed is foo_playcount v3.0.2.
Then I made a new theme in the scratchbox and applied it.

Code: [Select]
Core (2018-05-25 06:30:34 UTC)
    foobar2000 core 1.4 beta 15
foo_albumlist.dll (2018-05-25 06:29:58 UTC)
    Album List 4.6
foo_cdda.dll (2018-05-25 06:30:02 UTC)
    CD Audio Decoder 3.0
foo_converter.dll (2018-05-25 06:30:04 UTC)
    Converter 1.5.3
foo_dsp_eq.dll (2018-05-25 06:29:52 UTC)
    Equalizer 1.2.1
foo_dsp_std.dll (2018-05-25 06:29:52 UTC)
    Standard DSP Array 1.3.1
foo_fileops.dll (2018-05-25 06:29:56 UTC)
    File Operations 2.3
foo_freedb2.dll (2018-05-19 08:06:46 UTC)
    Online Tagger 0.7
foo_input_std.dll (2018-05-25 06:30:32 UTC)
    FFmpeg Decoders 3.2.4
    Standard Input Array 1.0
foo_playcount.dll (2018-05-26 18:17:53 UTC)
    Playback Statistics 3.0.2
foo_rgscan.dll (2018-05-25 06:29:58 UTC)
    ReplayGain Scanner 2.3
foo_ui_std.dll (2018-05-25 06:30:14 UTC)
    Default User Interface 0.9.5

Here is a link to my theme

Screenshots of the behavior:

advancing to next track:


I am using foobar2000 on Windows 7 x64, 8 GB RAM, Intel 4460i5 CPU

Ant help and suggestion would be appreciated.
7
Opus / Re: Opus frequency notching at 15.5 kHz
Last post by maikmerten -
Note that Opus splits audio into frequency bands and distributes bits along those. I imagine those bands to be "buckets" that bits can be allocated to.

The complete range from 15600 to 20000 Hz is coded in one "bucket" - band 20 to be more precise (c.f. table 55 in https://tools.ietf.org/html/rfc6716). Apparently the psychoacoustic model in Opus determined that while some energy is needed in this band, the detailed structure wasn't of high importance compared to the other bands. Thus the band was filled  somewhat uniformly, which is why things from 15600 to 20000 Hz look somewhat flat.

SimplePortal 1.0.0 RC1 © 2008-2018