IPB

Welcome Guest ( Log In | Register )

71 Pages V  « < 56 57 58 59 60 > »   
Reply to this topicStart new topic
foo_wave_seekbar, pretty accelerated seekbar
technicaltitch
post May 20 2013, 19:07
Post #1426





Group: Members
Posts: 5
Joined: 1-December 10
Member No.: 86162



Just a quick post in case anyone is as stupid as me. I was getting the:

Failed to load DLL: foo_wave_seekbar.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000.

DirectX installed, VC++ 2012 Redist installed.

I'm running Win 7 64 bit, so installed the 64 bit version of the VC++ 2012 redist. When I installed the 32bit version of the VC++ 2012 redist, foo_wave_seekbar reappeared.

If I'd just clicked on the link in the first post, which links directly to the 32 bit version download, rather than searching out the installer myself, (I've no idea why I did), I'd have been fine. rolleyes.gif

Go to the top of the page
+Quote Post
jarko2227
post May 20 2013, 19:42
Post #1427





Group: Members
Posts: 4
Joined: 27-January 11
Member No.: 87712



I have the same error sad.gif
QUOTE
Failed to load DLL: foo_wave_seekbar.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000.

plis fast fix it.
Go to the top of the page
+Quote Post
marc2003
post May 21 2013, 02:20
Post #1428





Group: Members
Posts: 4469
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE (carpman @ May 20 2013, 07:52) *
Let's say 2 weeks ago I altered the RG of 5 tracks, but I can't remember which tracks I altered.


sort by %last_modifed%. or have you been on a wild tagging spree changing the dates of all your other files? tongue.gif
Go to the top of the page
+Quote Post
carpman
post May 21 2013, 02:47
Post #1429





Group: Developer
Posts: 1317
Joined: 27-June 07
Member No.: 44789



Actually yes. Just added a %subcat% (been on a sub genre tagging spree). So in the process of going through music collection a whole bunch of files have been changed and will continue to be (whimsically re-tagged). But not nearly as many will be have their RG values changed. Thanks for asking. tongue.gif

C.

EDIT: marc2003, I'm not suggesting that it's an absolute necessity, nor am I suggesting that there's no way around this. All I'm saying is, if the option was there, I'd have it ticked. Clearly, you wouldn't.

This post has been edited by carpman: May 21 2013, 02:55


--------------------
TAK -p4m :: LossyWAV -q 6 | TAK :: Lame 3.98 -V 2
Go to the top of the page
+Quote Post
marc2003
post May 21 2013, 03:26
Post #1430





Group: Members
Posts: 4469
Joined: 27-January 05
From: England
Member No.: 19379



edit: junk reply removed. tongue.gif

i just re-read zao's original response to your post.

QUOTE
The analysis scans at full scale, no RG is applied during the process so traditional changes in RG values do not matter. As for people who use MP3Gain-like tools, one'd expect that they'd generate and modify tracks once, as the computed RG for something doesn't really change.


this applies to what you're doing, doesn't it?

This post has been edited by marc2003: May 21 2013, 03:31
Go to the top of the page
+Quote Post
carpman
post May 21 2013, 05:46
Post #1431





Group: Developer
Posts: 1317
Joined: 27-June 07
Member No.: 44789



That's really weird, I'd completely missed that reply from Zao. All I saw was:
QUOTE
carpman: Do you have some particular use case in mind where you'd have unpredictable and recurring modifications of the underlying audio stream data?

Thanks marc2003 (and Zao); consider my suggestion abandoned.

C.


--------------------
TAK -p4m :: LossyWAV -q 6 | TAK :: Lame 3.98 -V 2
Go to the top of the page
+Quote Post
Andreasvb
post May 21 2013, 07:47
Post #1432





Group: Members
Posts: 1337
Joined: 6-March 04
From: Sweden
Member No.: 12509



QUOTE (technicaltitch @ May 20 2013, 20:07) *
I'm running Win 7 64 bit, so installed the 64 bit version of the VC++ 2012 redist. When I installed the 32bit version of the VC++ 2012 redist, foo_wave_seekbar reappeared.

It's for the architecture the host program is using, in this case foobar2000, which is a 32-bit program. smile.gif
You're not the first.


--------------------
Windows 8.1u1 Pro x64 Media Center // foobar2000 1.3.3
Go to the top of the page
+Quote Post
sammael
post May 21 2013, 20:21
Post #1433





Group: Members
Posts: 7
Joined: 25-November 12
Member No.: 104759



Hi,
since I upgraded to latest version (0.2.38), when Direct3D is chosen as the output path, the waveform seekbar component hangs whole foobar window for about 5 seconds whenever it comes to view (i.e. on startup, when opening/closing visualisation (shpeck) etc)

when switched to GDI output this issue goes away, however it wasn't present in older versions as I used Direct3D without issue.

there is no console output, in fact, console claims the startup took 2 seconds, when in fact it takes over 8 seconds with 5 seconds of skipping music and frozen foobar window.

other than that no issues, thanks for great component!

edit: i reinstalled my skin from scratch to ensure it's not something else, and narrowed it down to the direct3d output path, as it happens on fresh install of foobar + tech skin as soon as i select direct3d in waveform seekbar preferences.

This post has been edited by sammael: May 21 2013, 20:24
Go to the top of the page
+Quote Post
Zao
post May 21 2013, 20:32
Post #1434





Group: Members (Donating)
Posts: 908
Joined: 25-September 03
From: Umeň, Sweden
Member No.: 9001



Does it happen in a fresh portable install without "skins", just the element/panel in Default UI and/or Columns UI?


--------------------
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.
Go to the top of the page
+Quote Post
sammael
post May 21 2013, 21:06
Post #1435





Group: Members
Posts: 7
Joined: 25-November 12
Member No.: 104759



QUOTE (Zao @ May 21 2013, 20:32) *
Does it happen in a fresh portable install without "skins", just the element/panel in Default UI and/or Columns UI?


Hello, I have just tested this and have to report it does indeed happen even on fresh portable installation with default ui, no skin and only new component (apart from default) installed being waveform seekbar. GDI mode again resolves this issue.
Go to the top of the page
+Quote Post
Zao
post May 22 2013, 13:14
Post #1436





Group: Members (Donating)
Posts: 908
Joined: 25-September 03
From: Umeň, Sweden
Member No.: 9001



What Windows version is this, what GPU and driver, and does this occur if you do a similiar install of an older version of the component into the portable environment?

Please try some of the following to narrow it down:
0.2.36
0.2.36.1
0.2.36.2
0.2.36.3
0.2.37
0.2.38


--------------------
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.
Go to the top of the page
+Quote Post
sammael
post May 22 2013, 14:07
Post #1437





Group: Members
Posts: 7
Joined: 25-November 12
Member No.: 104759



QUOTE (Zao @ May 22 2013, 13:14) *
What Windows version is this, what GPU and driver, and does this occur if you do a similiar install of an older version of the component into the portable environment?

Please try some of the following to narrow it down:
0.2.36
0.2.36.1
0.2.36.2
0.2.36.3
0.2.37
0.2.38


Windows 7 x64
primary monitor is on AMD Radeon HD7850 2GB
secondary monitor is on AMD Radeon HD5670 1GB
driver 13.5beta
8GB Ram
AMD Vishera FX-6300 Cpu
dxdiag log: http://pastebin.com/Z4abnmGC

After trying all the older versions you provided links for, I have found this behaviour on all, which leads me to believe it is indeed something within my system. I don't recall installing anything serious (like drivers etc) in last 2 weeks, and I'm positive it didn't freeze on startup before.

To better illustrate the issue I have made 2 short clips, both were made with 0.2.38 version but the links you provided exhibited same behaviour (whereas I am more than sure they didn't a week ago and as I have OCD about updating I'm pretty sure I used all versions as they came out). Frankly speaking I'm at a loss as to what's happening. I mean in the end, it's no big deal, I can live with GDI path, but it keeps bugging me.

First one is startup with Direct3D path (notice the window frozen and music skipping):
http://youtu.be/FRa73PBQOqE

This is how the startup looks/sounds with same config, just GDI output.
http://youtu.be/8wQ7VcYjt_c

(the stupid phone cut off the part where the seekbar is but its just under the song list biggrin.gif)
the clips were made with tech skin, but the behaviour is the same in fresh portable install as i noted in previous post.

Thanks for any suggestions

This post has been edited by sammael: May 22 2013, 14:13
Go to the top of the page
+Quote Post
Zao
post May 23 2013, 00:18
Post #1438





Group: Members (Donating)
Posts: 908
Joined: 25-September 03
From: Umeň, Sweden
Member No.: 9001



Please run a test program designed to emulate the D3D9 frontend startup process and reply to me (in private if you like) with the results from the report you get after closing it. You can Ctrl-C the message box to copy them to the clipboard.
The results will be like:
CODE
(t: 0.003025, dt: 0.003025): initializing d3d
(t: 0.012729, dt: 0.009704): enumerating multisamples
(t: 0.016671, dt: 0.003942): creating device
(t: 0.089040, dt: 0.072369): testing texture formats
(t: 0.089134, dt: 0.000094): initialized d3d
(t: 0.089136, dt: 0.000002): creating resources
(t: 0.089152, dt: 0.000016): creating effect
(t: 0.129686, dt: 0.040534): creating textures
(t: 0.129773, dt: 0.000088): filling textures
(t: 0.130172, dt: 0.000398): created resources
(t: 0.130174, dt: 0.000002): startup done
(t: 0.130174, dt: 0.000000): clearing
(t: 0.130177, dt: 0.000003): drawing
(t: 0.130536, dt: 0.000359): presenting
(t: 0.139090, dt: 0.008554): done


--------------------
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.
Go to the top of the page
+Quote Post
sammael
post May 23 2013, 02:07
Post #1439





Group: Members
Posts: 7
Joined: 25-November 12
Member No.: 104759



QUOTE (Zao @ May 23 2013, 00:18) *
Please run a test program...


Hello,

Not sure if the program is supposed to end by itself, but I closed it after a bit and this is what came in the Timing report window:

CODE
---------------------------
Timing report
---------------------------
(t: 0.025619, dt: 0.025619): initializing d3d
(t: 0.038396, dt: 0.012777): enumerating multisamples
(t: 0.045829, dt: 0.007433): creating device
(t: 0.137369, dt: 0.091540): testing texture formats
(t: 0.137526, dt: 0.000157): initialized d3d
(t: 0.137529, dt: 0.000003): creating resources
(t: 0.137569, dt: 0.000040): creating effect
(t: 0.193159, dt: 0.055590): creating textures
(t: 0.193427, dt: 0.000268): filling textures
(t: 0.194212, dt: 0.000785): created resources
(t: 0.194219, dt: 0.000006): startup done
(t: 0.194219, dt: 0.000001): clearing
(t: 0.194225, dt: 0.000005): drawing
(t: 0.194997, dt: 0.000773): presenting
(t: 2.883113, dt: 2.688116): done

---------------------------
OK  
---------------------------

Hope it helps.
Go to the top of the page
+Quote Post
Zao
post May 23 2013, 02:32
Post #1440





Group: Members (Donating)
Posts: 908
Joined: 25-September 03
From: Umeň, Sweden
Member No.: 9001



That's a 2.5 second stall on presenting, compared to the 8 milliseconds I experience.
Are you running any screen capture software like fraps or dxtory, or some user interface hacks or other software that could envisionably hook the device? Also, does this persist if you disable your secondary graphics adapter?

There's not really much seekbar specific in that test code, it's just using the effect and some hardcoded waveform data. There's something fundamentally odd with your box.

This post has been edited by Zao: May 23 2013, 02:50


--------------------
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.
Go to the top of the page
+Quote Post
sammael
post May 23 2013, 02:51
Post #1441





Group: Members
Posts: 7
Joined: 25-November 12
Member No.: 104759



QUOTE (Zao @ May 23 2013, 02:32) *
That's a 2.5 second stall on presenting, compared to the 8 milliseconds I experience.
Are you running any screen capture software like fraps or dxtory, or some user interface hacks or other software that could envisionably hook the device? Also, does this persist if you disable your secondary graphics adapter?

You nailed it!

I only run 2 programs like that - MSI Afterburner and RadeonPro. Aaaand the culprit is RadeonPro, which indeed I remember upgrading to Preview version few days ago. When I close RadeonPro The issue goes away.

I fiddled around and found a way to make RadeonPro ignore foobar, by simply setting "Disable API monitoring for programs not on profile list" (not exact spelling but the setting is called along those lines. With that setting enabled I can run RadeonPro which enforces profiles for chosen apps, and the waweform seekbar works as a charm with direct3d path again.

the utility reports no stall at last step now as well.
CODE
---------------------------
Timing report
---------------------------
(t: 0.013567, dt: 0.013567): initializing d3d
(t: 0.026311, dt: 0.012744): enumerating multisamples
(t: 0.032623, dt: 0.006312): creating device
(t: 0.095033, dt: 0.062410): testing texture formats
(t: 0.095171, dt: 0.000137): initialized d3d
(t: 0.095173, dt: 0.000002): creating resources
(t: 0.095204, dt: 0.000031): creating effect
(t: 0.146723, dt: 0.051520): creating textures
(t: 0.146896, dt: 0.000173): filling textures
(t: 0.148053, dt: 0.001156): created resources
(t: 0.148057, dt: 0.000004): startup done
(t: 0.148057, dt: 0.000000): clearing
(t: 0.148060, dt: 0.000003): drawing
(t: 0.148809, dt: 0.000749): presenting
(t: 0.154400, dt: 0.005591): done

---------------------------
OK  
---------------------------

Thank you very much for taking time to help me narrow down the issue, keep up the great work!
Go to the top of the page
+Quote Post
fateswarm
post May 23 2013, 12:50
Post #1442





Group: Members
Posts: 11
Joined: 14-May 13
Member No.: 108124



-wrong post-

This post has been edited by fateswarm: May 23 2013, 12:55
Go to the top of the page
+Quote Post
Zao
post May 23 2013, 12:57
Post #1443





Group: Members (Donating)
Posts: 908
Joined: 25-September 03
From: Umeň, Sweden
Member No.: 9001



In any remotely standard UI configuration you have the numeric time in the status bar.
Additionally, there already is a numeric tooltip while seeking, that is, holding your mouse button and dragging around. If you don't want to seek, simply drag the cursor far enough outside the element to abort the seek.

(edit: seems like the post it replied to was edited away, it was regarding hover tooltips)

This post has been edited by Zao: May 23 2013, 12:58


--------------------
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.
Go to the top of the page
+Quote Post
garbanzo.bean
post May 28 2013, 00:32
Post #1444





Group: Members
Posts: 264
Joined: 25-September 08
Member No.: 58627



After updating, all waveforms appear blown out, filling the whole width of the window without much variation. Previously I saw a lot of white space behind the waveform - now it's just solid.

Same track then and now:



Here's the configuration I'm using - maybe something changed and it needs to be adjusted?

CODE
Texture1D tex : WAVEFORMDATA;

SamplerState sTex
{
Filter = MIN_MAG_MIP_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 shade_played : SHADEPLAYED;

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);

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(float4 bg, float4 fg, float factor)
{
return saturate(lerp(bg, fg, factor));
}

float4 played( float pos, float2 tc, float4 bg, float factor)
{
float4 c = bg;
if (pos > tc.x)
{
c = evaluate(backgroundColor, highlightColor, factor);
}
return c;
}

float RMSfactor( float2 tc, float border )
{
// alpha 1 indicates biased texture
float4 minmaxrms = tex.Sample(sTex, tc.x);
if (replayGain.g != -1000) {
minmaxrms.rgb *= pow(10,(replayGain.g) / 20) * 2; //use track gain
} else if (replayGain.r != -1000) {
minmaxrms.rgb *= pow(10,(replayGain.r) / 20) * 2; //use album gain
}
minmaxrms.rgb -= 0.5 * minmaxrms.a;
minmaxrms.rgb *= 1.0 + minmaxrms.a;

float belowWave = tc.y + border - minmaxrms.r;
float aboveWave = tc.y - border - minmaxrms.g;
float factorWave = min(abs(belowWave), abs(aboveWave));
bool insideWave = (belowWave > 0 && aboveWave < 0);

float diffRms = abs(tc.y) - border - minmaxrms.b;
float factorRms = abs(diffRms);
bool insideRms = diffRms < 0;

float factor = insideRms ? (1.0 - 0.5 * saturate(factorRms / border / 2)): 1.0;
factor = insideWave ? (factor * saturate(factorWave / border / 2)) : 0.0;

return factor;
}

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;

float factor = RMSfactor(input.tc, 2.5 * dy);

float4 c0 = evaluate(backgroundColor, textColor, factor);
if (shade_played)
c0 = played(cursorPos, input.tc, c0, factor);
c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
c0 = bar(seekPos, input.tc, selectionColor, c0, seekWidth, seeking );
return c0;
}

technique10 Render10
{
pass P0
{
SetGeometryShader( 0 );
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetPixelShader( CompileShader( ps_4_0, PS() ) );
}
}

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


This post has been edited by db1989: May 28 2013, 00:37
Reason for edit: Put large pastes in [codebox]es, not [code] tags.
Go to the top of the page
+Quote Post
Propheticus
post May 28 2013, 11:31
Post #1445





Group: Members
Posts: 219
Joined: 10-September 11
Member No.: 93615



Try this code. The problem is in the fact you are chaining replaygain calculation and normal wave hight calculation. I've changed the code so the normal wave heigth calculation only gets used when there's no rpgain info available.

CODE

Texture1D tex : WAVEFORMDATA;

SamplerState sTex
{
Filter = MIN_MAG_MIP_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 shade_played : SHADEPLAYED;

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);

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(float4 bg, float4 fg, float factor)
{
return saturate(lerp(bg, fg, factor));
}

float4 played( float pos, float2 tc, float4 bg, float factor)
{
float4 c = bg;
if (pos > tc.x)
{
c = evaluate(backgroundColor, highlightColor, factor);
}
return c;
}

float RMSfactor( float2 tc, float border )
{
// alpha 1 indicates biased texture
float4 minmaxrms = tex.Sample(sTex, tc.x);
if (replayGain.g != -1000) {
minmaxrms.rgb *= pow(10,(replayGain.g) / 20) * 1.8; //use track gain
} else if (replayGain.r != -1000) {
minmaxrms.rgb *= pow(10,(replayGain.r) / 20) * 1.8; //use album gain
} else {
minmaxrms.rgb *= 0.9 + minmaxrms.a;
}

float belowWave = tc.y + border - minmaxrms.r;
float aboveWave = tc.y - border - minmaxrms.g;
float factorWave = min(abs(belowWave), abs(aboveWave));
bool insideWave = (belowWave > 0 && aboveWave < 0);

float diffRms = abs(tc.y) - border - minmaxrms.b;
float factorRms = abs(diffRms);
bool insideRms = diffRms < 0;

float factor = insideRms ? (1.0 - 0.5 * saturate(factorRms / border / 2)): 1.0;
factor = insideWave ? (factor * saturate(factorWave / border / 2)) : 0.0;

return factor;
}

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;

float factor = RMSfactor(input.tc, 2.5 * dy);

float4 c0 = evaluate(backgroundColor, textColor, factor);
if (shade_played)
c0 = played(cursorPos, input.tc, c0, factor);
c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
c0 = bar(seekPos, input.tc, selectionColor, c0, seekWidth, seeking );
return c0;
}

technique10 Render10
{
pass P0
{
SetGeometryShader( 0 );
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetPixelShader( CompileShader( ps_4_0, PS() ) );
}
}

technique Render9
{
pass
{
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_2_0 PS();
}
}
Go to the top of the page
+Quote Post
garbanzo.bean
post May 28 2013, 13:53
Post #1446





Group: Members
Posts: 264
Joined: 25-September 08
Member No.: 58627



That helps a little, but there are still many wafeforms that are overblown.
What I don't understand is why it was working before, but now it's not sad.gif
Go to the top of the page
+Quote Post
skullinsky
post Jun 2 2013, 21:04
Post #1447





Group: Members
Posts: 11
Joined: 2-June 13
Member No.: 108445



Really nice plugin, but i have an issue to report.
In the beginning i thought that i would have to ask how it is with instalation of the libraries (but thanks to
technicaltitch
i noticed the links in first post)

...but now the seekbar doesnt load a new wave after i change a song to play. or, it loads the wave, but i have to resize the window to actually make it visible. i did copy&paste the script written by Propheticus on this forum to the frontend settings. ...aand now i see that there is the issue. Since i am not a coder, i dont know where. but i like the style of highlight he uses..

Could anyoone tell me what to rewrite, and to what?
Go to the top of the page
+Quote Post
Propheticus
post Jun 3 2013, 14:05
Post #1448





Group: Members
Posts: 219
Joined: 10-September 11
Member No.: 93615



CODE
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 chan_mag : CHANNELMAGNITUDE; // Requires "foo_wave_seekbar" version 0.2.34 or better
float4 track_mag : TRACKMAGNITUDE; // Requires "foo_wave_seekbar" version 0.2.34 or better
float4 backgroundColor : BACKGROUNDCOLOR;
float4 highlightColor : HIGHLIGHTCOLOR;
float4 selectionColor : SELECTIONCOLOR;
float4 textColor : TEXTCOLOR;
float cursorPos : CURSORPOSITION;
bool cursorVisible : CURSORVISIBLE;
float seekPos : SEEKPOSITION;
bool seeking : SEEKING;
float2 viewportSize : VIEWPORTSIZE;
bool horizontal : ORIENTATION;
bool flipped : FLIPPED;
bool shade_played : SHADEPLAYED;

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);

//- NORMALIZE/RESCALE ALL WAVEFORMS TO FILL PANEL EDGE-TO-EDGE -
//Requires "foo_wave_seekbar" version 0.2.34 or better - see changelog
//This variation will map the range [-1,1] to [min_peak,max_peak].
input.tc.y = (input.tc.y + 1)/2 * (chan_mag.g - chan_mag.r) + chan_mag.r;
//This variation will map the range [-1,1] to [-largest_peak,largest_peak]
//input.tc.y = input.tc.y * max(abs(chan_mag.r), abs(chan_mag.g));

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(float4 bg, float4 fg, float factor)
{
return saturate(lerp(bg, fg, factor));
}

float4 played( float pos, float2 tc, float4 bg, float factor)
{
float4 c = bg;
if (pos > tc.x)
{
c = evaluate(backgroundColor, highlightColor, factor);
}
return c;
}

float RMSfactor( float2 tc, float border )
{
float4 minmaxrms = tex1D(sTex, tc.x);

minmaxrms.rgb *= 0.95 + minmaxrms.a;

float belowWave = tc.y + border - minmaxrms.r;
float aboveWave = tc.y - border - minmaxrms.g;
float factorWave = min(abs(belowWave), abs(aboveWave));
bool insideWave = (belowWave > 0 && aboveWave < 0);

float diffRms = abs(tc.y) - border - minmaxrms.b;
float factorRms = abs(diffRms);
bool insideRms = diffRms < 0;

float factor = insideRms ? ( 1 + 0.17 * saturate(factorRms / border / 2)): 1;
factor = insideWave ? (factor * saturate(factorWave / border / 0.5)) : 0; //1 = max sharp

return factor;
}

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 = 1 * dx;
float positionWidth = 1 * dx;

float factor = RMSfactor(input.tc, 2.5 * dy);

float4 c0 = evaluate(backgroundColor, textColor, factor);
if (shade_played)
c0 = played(cursorPos, input.tc, c0, factor);
c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
c0 = bar(seekPos, input.tc, selectionColor, c0, seekWidth, seeking );
return c0;
}

technique10 Render10
{
pass P0
{
SetGeometryShader( 0 );
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetPixelShader( CompileShader( ps_4_0, PS() ) );
}
}

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



this is the current code I use, now with faux-normalization/rescaling instead of replaygain. Be sure to enable front left + front right when using mix-down to stereo, and front center(mono) when using mix-down to mono.

This post has been edited by Propheticus: Jun 3 2013, 14:09
Go to the top of the page
+Quote Post
skullinsky
post Jun 3 2013, 14:20
Post #1449





Group: Members
Posts: 11
Joined: 2-June 13
Member No.: 108445



QUOTE (Propheticus @ Jun 3 2013, 14:05) *
CODE
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 chan_mag : CHANNELMAGNITUDE; // Requires "foo_wave_seekbar" version 0.2.34 or better
float4 track_mag : TRACKMAGNITUDE; // Requires "foo_wave_seekbar" version 0.2.34 or better
float4 backgroundColor : BACKGROUNDCOLOR;
float4 highlightColor : HIGHLIGHTCOLOR;
float4 selectionColor : SELECTIONCOLOR;
float4 textColor : TEXTCOLOR;
float cursorPos : CURSORPOSITION;
bool cursorVisible : CURSORVISIBLE;
float seekPos : SEEKPOSITION;
bool seeking : SEEKING;
float2 viewportSize : VIEWPORTSIZE;
bool horizontal : ORIENTATION;
bool flipped : FLIPPED;
bool shade_played : SHADEPLAYED;

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);

//- NORMALIZE/RESCALE ALL WAVEFORMS TO FILL PANEL EDGE-TO-EDGE -
//Requires "foo_wave_seekbar" version 0.2.34 or better - see changelog
//This variation will map the range [-1,1] to [min_peak,max_peak].
input.tc.y = (input.tc.y + 1)/2 * (chan_mag.g - chan_mag.r) + chan_mag.r;
//This variation will map the range [-1,1] to [-largest_peak,largest_peak]
//input.tc.y = input.tc.y * max(abs(chan_mag.r), abs(chan_mag.g));

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(float4 bg, float4 fg, float factor)
{
return saturate(lerp(bg, fg, factor));
}

float4 played( float pos, float2 tc, float4 bg, float factor)
{
float4 c = bg;
if (pos > tc.x)
{
c = evaluate(backgroundColor, highlightColor, factor);
}
return c;
}

float RMSfactor( float2 tc, float border )
{
float4 minmaxrms = tex1D(sTex, tc.x);

minmaxrms.rgb *= 0.95 + minmaxrms.a;

float belowWave = tc.y + border - minmaxrms.r;
float aboveWave = tc.y - border - minmaxrms.g;
float factorWave = min(abs(belowWave), abs(aboveWave));
bool insideWave = (belowWave > 0 && aboveWave < 0);

float diffRms = abs(tc.y) - border - minmaxrms.b;
float factorRms = abs(diffRms);
bool insideRms = diffRms < 0;

float factor = insideRms ? ( 1 + 0.17 * saturate(factorRms / border / 2)): 1;
factor = insideWave ? (factor * saturate(factorWave / border / 0.5)) : 0; //1 = max sharp

return factor;
}

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 = 1 * dx;
float positionWidth = 1 * dx;

float factor = RMSfactor(input.tc, 2.5 * dy);

float4 c0 = evaluate(backgroundColor, textColor, factor);
if (shade_played)
c0 = played(cursorPos, input.tc, c0, factor);
c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
c0 = bar(seekPos, input.tc, selectionColor, c0, seekWidth, seeking );
return c0;
}

technique10 Render10
{
pass P0
{
SetGeometryShader( 0 );
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetPixelShader( CompileShader( ps_4_0, PS() ) );
}
}

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



this is the current code I use, now with faux-normalization/rescaling instead of replaygain. Be sure to enable front left + front right when using mix-down to stereo, and front center(mono) when using mix-down to mono.




Works perfectly! thanks.
Go to the top of the page
+Quote Post
Zao
post Jun 3 2013, 14:23
Post #1450





Group: Members (Donating)
Posts: 908
Joined: 25-September 03
From: Umeň, Sweden
Member No.: 9001



As a side note, you can completely remove the technique10 block, that hasn't done anything since early 0.1.


--------------------
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.
Go to the top of the page
+Quote Post

71 Pages V  « < 56 57 58 59 60 > » 
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd September 2014 - 22:28