IPB

Welcome Guest ( Log In | Register )

73 Pages V  « < 57 58 59 60 61 > »   
Reply to this topicStart new topic
foo_wave_seekbar, pretty accelerated seekbar
dinfinity
post Jun 3 2013, 18:15
Post #1451





Group: Members
Posts: 3
Joined: 3-June 13
Member No.: 108469



First off: great component for fb2k. Thanks, Zao!

Having said that: I've tried moving to Direct3D from GDI (for normalization support), but every time I do, I end up hunting for shaders that have already been written, disliking their look and going back to GDI.

I'd propose either adding normalization support for GDI, or instating some kind of repository for example shaders (or even just a preset dir).
In any case, it might be worth it to mandate an explicit split of the shader code into elements responsible for different parts of the rendering process. Complete control over the shader code is nice, but it's not very accessible or convenient.
Go to the top of the page
+Quote Post
Zao
post Jun 3 2013, 18:33
Post #1452





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



All you need is a time machine to download the non-existent v2.

If I implement something composable going forward, it'll probably be in the form of simple layers achieving a single thing, which can be stacked and blended together.

Modularisation as it stands is hard, as I'd have to interpret the contents of the blocks and compose them into unified HLSL that wouldn't blow the instruction limits.
The default effect is already very close to the limits of some of the 2.x shader models.

As for a looks repository, I've pondered it but it would involve web-dev, which makes my eyes bleed.


--------------------
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
urutapu
post Jun 10 2013, 00:38
Post #1453





Group: Members
Posts: 1
Joined: 10-June 13
Member No.: 108576



Hey, I'm pretty new to editing the foobar interface so sorry if this is a dumb question, but is there some way to replace the normal seekbar with the waveform seekbar or at least put it up on/near the toolbar?
Go to the top of the page
+Quote Post
Zao
post Jun 10 2013, 00:54
Post #1454





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



urutapu:In the Default UI, I do not currently have the capability to add any custom toolbars, it can only go where UI elements can go.
In Columns UI, the component works both as an UI panel and an UI toolbar.

The closest you can get to having it a toolbar is making a top/bottom split, putting the seekbar in the upper half and the rest of your UI in the lower half.


--------------------
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
Zao
post Jun 10 2013, 00:56
Post #1455





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



For you people who for some strange reason listen to .1 content and display it mixed down to stereo or mono, there are changes coming up in 0.2.39.3 where I now include the LFE channel in the mixdown result after consulting relevant documentation and mindmelding with testers.
QUOTE
LFE mixdown factor is now 0.5 per channel.
Removing the LFE channel completely from mixdowns is a bit of a lie, as
the content, even while purely supplemental, has some meaning in the
context of a track.

As every mixdown is a reinterpretation of the data, having an effect
over-represented is better than completely omitting it, particularly as
there is now shader parameters to adjust the displayed range of a
waveform.

ITU recommendation BS.775 specifies a choice of four mixin factors for
LFE content: 0.7071, 0.5, 0.0 and 'reserved', to be specified by the
broadcaster. As any such information is not available, I've selected 0.5
as the coefficient due to it being the lowest non-zero choice, avoiding
over-attenuation while still representing the content somehow.


--------------------
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
dinfinity
post Jun 10 2013, 10:25
Post #1456





Group: Members
Posts: 3
Joined: 3-June 13
Member No.: 108469



QUOTE (Zao @ Jun 3 2013, 18:33) *
Modularisation as it stands is hard, as I'd have to interpret the contents of the blocks and compose them into unified HLSL that wouldn't blow the instruction limits.
The default effect is already very close to the limits of some of the 2.x shader models.

I wasn't aware that anybody still cared about 2.x shader model limits. 3.0 was introduced 9 years ago tongue.gif

Concerning the modularisation: you could also create more of an implicit social contract between people who write shader code. That is: just have several designated text editors for different parts of the shader code, but simply concatenate their contents. This would not break flexibility nor should it be a lot of work, but it would stimulate more segmented customization.
Go to the top of the page
+Quote Post
Zao
post Jun 10 2013, 10:34
Post #1457





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



QUOTE (dinfinity @ Jun 10 2013, 11:25) *
I wasn't aware that anybody still cared about 2.x shader model limits. 3.0 was introduced 9 years ago tongue.gif

The machines people use to play music tend to more often than not be considered 'vintage'. There's lots of bending over in the Direct3D9 component to support all kinds of odd texture formats and GPU quirks.
QUOTE (dinfinity @ Jun 10 2013, 11:25) *
Concerning the modularisation: you could also create more of an implicit social contract between people who write shader code. That is: just have several designated text editors for different parts of the shader code, but simply concatenate their contents. This would not break flexibility nor should it be a lot of work, but it would stimulate more segmented customization.

The optimal solution would be one that has a minimum amount of GUI work needed for me in the component itself. The sane solution would probably be a standalone effect designer, either using some weirdo GUI toolkit like Qt, or driven via the browser or something. The current scintilla component as I use it is ... not good, and tends to be slightly unstable.


--------------------
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
EpicForever
post Jun 13 2013, 17:36
Post #1458





Group: Members
Posts: 721
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



QUOTE (urutapu @ Jun 10 2013, 01:38) *
Hey, I'm pretty new to editing the foobar interface so sorry if this is a dumb question, but is there some way to replace the normal seekbar with the waveform seekbar or at least put it up on/near the toolbar?


You can use top/bottom splitter in Default UI (as Zao said), and additionally you can turn off regular seekbar when you rightclick on toolbar. I turned off regular seekbar, but I placed waveform one at the bottom of my layout.
Go to the top of the page
+Quote Post
Zao
post Jun 13 2013, 19:10
Post #1459





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



0.2.39.6 is out now. If you've installed any of the 0.2.39 series, please upgrade to this one, it resolves a bug where the foobar2000 installer will not finish due to my component being stupid.
Changelog 0.2.39.6


--------------------
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
EpicForever
post Jun 13 2013, 19:21
Post #1460





Group: Members
Posts: 721
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



Zao, one question - could coefficients for downmixing display of multichannel tracks to mono/stereo be made as user editable values? For example in that script window or somewhere in foobar's "Advanced Preferences"?
Go to the top of the page
+Quote Post
Zao
post Jun 13 2013, 19:50
Post #1461





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



A core problem with making things configurable is that anything is made configurable, it's set in stone forever. You cannot distinguish between a user-selected value and one that was the default in the past, which makes it quite a bother for changing the defaults for a reason.


--------------------
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
EpicForever
post Jun 13 2013, 21:06
Post #1462





Group: Members
Posts: 721
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



OK, but do you see such possibility in future or is it just impossible from your point of view? I know that I can't force you and I understand that you can simply don't have enough time. If you don't plan it at any time then just say "no" smile.gif
Go to the top of the page
+Quote Post
dinfinity
post Jun 14 2013, 01:08
Post #1463





Group: Members
Posts: 3
Joined: 3-June 13
Member No.: 108469



QUOTE (Zao @ Jun 10 2013, 10:34) *
The machines people use to play music tend to more often than not be considered 'vintage'. There's lots of bending over in the Direct3D9 component to support all kinds of odd texture formats and GPU quirks.

I doubt the 'more often than not' part of that, but it is noble that you choose to support such hardware nonetheless (and endure all the pain that comes with it ;-).

QUOTE
The optimal solution would be one that has a minimum amount of GUI work needed for me in the component itself. The sane solution would probably be a standalone effect designer, either using some weirdo GUI toolkit like Qt, or driven via the browser or something. The current scintilla component as I use it is ... not good, and tends to be slightly unstable.

I'd say that 'adding some extra textareas' is about the least amount of GUI work definable within the realm of GUI work ;-)

Anyway, I've switched back to GDI rendering again. Although it sounds awesome, I really can't justify spending several hours on 'programming shaders for a static waveform visualization in my music player' ;-)
Still a thankful user of your component, of course.
Go to the top of the page
+Quote Post
nesvariigi
post Jun 18 2013, 00:46
Post #1464





Group: Members
Posts: 6
Joined: 29-April 13
From: Riga
Member No.: 107894



Where can I find old versions? L O L.
Go to the top of the page
+Quote Post
Zao
post Jun 18 2013, 15:01
Post #1465





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



That depends on why you need them. If there's something that is inferior or unacceptable in a newer version, I'd rather work in public towards resolving that than to have a bunch of people staying on versions with eternal bugs.


--------------------
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
grunz
post Jun 20 2013, 20:09
Post #1466





Group: Members
Posts: 2
Joined: 20-June 13
Member No.: 108747



i would also like to know where i could find an older version of your plugin. the reason for that is, that i'm running foobar2k with wine on ubuntu linux. starting with some version which i don't exactly remember, foobar started crashing when waveform seekbar was installed. unfortunately, i couldn't find a workaround yet, but i'd love to continue using the plugin.
Go to the top of the page
+Quote Post
garbanzo.bean
post Jun 21 2013, 02:03
Post #1467





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



How do I achieve this effect, with the grayscale seekbar becoming colored with time?

Go to the top of the page
+Quote Post
Zao
post Jun 21 2013, 02:57
Post #1468





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



QUOTE (grunz @ Jun 20 2013, 21:09) *
i would also like to know where i could find an older version of your plugin. the reason for that is, that i'm running foobar2k with wine on ubuntu linux. starting with some version which i don't exactly remember, foobar started crashing when waveform seekbar was installed. unfortunately, i couldn't find a workaround yet, but i'd love to continue using the plugin.

The only way I can ever find out about these kinds of problems is if I'm told about them, as wine is explicitly ignored by the crash reporting system.


--------------------
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
skullinsky
post Jun 21 2013, 15:07
Post #1469





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



QUOTE (garbanzo.bean @ Jun 21 2013, 02:03) *
How do I achieve this effect, with the grayscale seekbar becoming colored with time?



Open settings, select Direct3D, then open Frontend settings, and paste this code:
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();
}
}


then apply, and set up colors (here is preview with my colors (red / dark red / black)


...its a code someone mentioned here earlier, and it isnt the only one solution...

I have a question myself though... Could someone give me a hint how to edit this code so that it would show the waves as are on Soundcloud?


I am talking about the mirror effect on L/R output

This post has been edited by skullinsky: Jun 21 2013, 15:20
Go to the top of the page
+Quote Post
nesvariigi
post Jun 22 2013, 22:18
Post #1470





Group: Members
Posts: 6
Joined: 29-April 13
From: Riga
Member No.: 107894



QUOTE (Zao @ Jun 18 2013, 16:01) *
That depends on why you need them. If there's something that is inferior or unacceptable in a newer version, I'd rather work in public towards resolving that than to have a bunch of people staying on versions with eternal bugs.
Sorry for late answer. D3D mode worked fine few versions back. But now it is displayed wrong.

I admit, it is an old laptop, maybe it lacks some new hardware features. :/
Go to the top of the page
+Quote Post
Zao
post Jun 23 2013, 02:34
Post #1471





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



nesvariigi: Is this a custom effect? Could you put your D3D effect code in a post with a codebox, as well as mention what graphics card and OS this is running on. I haven't seen that look since 2009 smile.gif


--------------------
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
daviszarins
post Jun 23 2013, 04:16
Post #1472





Group: Members
Posts: 5
Joined: 22-June 13
From: Latvia
Member No.: 108779



QUOTE (Zao @ Jun 23 2013, 03:34) *
nesvariigi: Is this a custom effect? Could you put your D3D effect code in a post with a codebox, as well as mention what graphics card and OS this is running on. I haven't seen that look since 2009 smile.gif
I have no custom effects (default code). Graphics adapter is Trident CyberALADDiN-P4 v6.4612.22ICD_SE_NP. OS is WinXP Pro SP3 x86. As I mentioned, it is old laptop used mainly for music listening. I added pictures with D3D features support.

Go to the top of the page
+Quote Post
Zao
post Jun 23 2013, 04:34
Post #1473





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



Amazing. The code must be falling into some sort of software rasterisation mode, or the driver for that card does some extreme magic.
It's also possible that all this time it has been falling back onto GDI mode transparently and _something_ changed enough to make the frontend kind of load.


--------------------
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
daviszarins
post Jun 23 2013, 04:36
Post #1474





Group: Members
Posts: 5
Joined: 22-June 13
From: Latvia
Member No.: 108779



So you say, it is impossible to run D3D mode on this hardware?
Go to the top of the page
+Quote Post
Zao
post Jun 23 2013, 05:05
Post #1475





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



Older versions are available for testing purposes, so if you can find the version change where it stops working it would help me find out if it's something I did and what the reason might be. Make sure you look at the console and see if it succeeds at loading the Direct3D9 frontend or if it's falling back to GDI mode.
CODE


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

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

 



RSS Lo-Fi Version Time is now: 26th December 2014 - 07:04