fc2ブログ

PCオーディオのススメ(ボツ)

※この記事は企画倒れしてしまったので読んでも意味なし芳一です。

最近はネットワークオーディオプレイヤーなんてのも多く出ていますが、私はどのみちPCで何かやりながら音楽を聴くので、PCオーディオで十分だったりします。
PCオーディオにはいくつか関門があります。
1.静音PCの準備
2.DACの準備
3.リッピング・ダウンロード
4.再生ソフトの設定
などなど……
今回は4の再生ソフトを紹介しようかなと思います。

私のPCのデスクトップ画面です。
desuku.jpg

この再生ソフトはド定番のfoobar2000というフリーソフトですが、私のモノはスキン(外装)を変えております。

player.jpg

これ、シンプルなんですが作るの結構苦労しました。
上のバーは中心に左右各チャンネルの音の大きさ、その外に周波数。曲目リストの下には曲の左右各チャンネルの音量分布があり、縦棒は今、曲のその位置を再生してますよっていう棒です。

このスキンをなんと先着5兆名の方にプレゼントしちゃいます!

……と、思ったのですがこのスキンをエクスポートして、他のPCにインポートしても、その後、いろいろ設定をし直さないといけないことが判明しましたorz
プレゼントは中止になり、この記事自体意味なしに……
一応、設定すれば近いものになるファイルを置いておきます。
↑これをfoobarをインストールしたフォルダごと上書きしてください。
こちらもダウンロードして下さい。
そしてココの下の方にあるWaveform Seekbar 0.2.45というのをインストールします。
そして、foobarを起動するとデフォルトUIか、columns UIかを選択するウィンドウが出ると思いますので、そこでcolumns UIを選択して下さい。
Library→configure→Displayの横の▶をクリック、columns UIをクリックし、Importで、先ほどダウンロードしたあべスキンを選択します。setsumei.jpg
これで、ウィンドウのサイズを調整したり、Playlistview→General→Playlist edge styleをnonに変更したりします。
プレイリストのタイトルの横の横線を除くには、GroupingのタグのScriptをダブルクリックし、以下をコピペして下さい。

$directory(%path%,2) / %directory%$if(%_is_group%,
)
)
----------------------------↑ここまで↑------------------------------
Waveform Seekbarの設定が厄介です。下の曲の音量分布のバーの上の段(左チャンネル)と下の段で(右チャンネル)で設定が異なります。
右クリックをしてConfigure→Frontend Setteingsで以下をコピペ
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;

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 faded_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 fluff = smoothstep(vert_from, vert_to, abs(tc.y));
float4 c = show
? lerp(fg, bg, max(fluff, smoothstep(0, width, dist)))
: bg;
return c;
}

// #define BORDER_ON_HIGHLIGHT

float4 played( float pos, float2 tc, float4 fg, float4 bg, float alpha)
{
float4 c = bg;
float2 d = 1 / viewportSize;
if (pos > tc.x)
{
#ifdef BORDER_ON_HIGHLIGHT
if (tc.x < d.x || tc.y >= (1 - d.y) || tc.y <= (2 * d.y - 1))
c = selectionColor;
else
#endif
c = lerp(c, fg, saturate(alpha));
}
return c;
}

float4 evaluate( float2 tc )
{
// alpha 1 indicates biased texture
float4 minmaxrms = tex1D(sTex, tc.x);
minmaxrms.rgb -= 0.87 * minmaxrms.a;
minmaxrms.rgb *= 1.8 + 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.1);
bool inside_rms = abs(tc.y) <= minmaxrms.b;

#if 1
float4 bgColor = backgroundColor;
#else
float a = viewportSize.x / viewportSize.y;
float2 aspect = horizontal ? float2(a, 1) : float2(1/a, 1);
float2 tcBg = float2(tc.x, -tc.y / 2 + 0.5) * aspect;
float4 bgColor = tex2D(sTexBg, tcBg);
#endif

float4 wave = outside
? bgColor
: lerp(bgColor, textColor, 3.0);

return saturate(wave);
}

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 = 2 * dx;

float4 c0 = evaluate(input.tc);
c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
c0 = bar(seekPos, input.tc, selectionColor, c0, seekWidth, seeking );
if (shade_played)
c0 = played(cursorPos, input.tc, highlightColor, c0, 0);
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();
}
}
----------------------------↑ここまで↑------------------------------

下の段は以下をコピペ
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;

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 faded_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 fluff = smoothstep(vert_from, vert_to, abs(tc.y));
float4 c = show
? lerp(fg, bg, max(fluff, smoothstep(0, width, dist)))
: bg;
return c;
}

// #define BORDER_ON_HIGHLIGHT

float4 played( float pos, float2 tc, float4 fg, float4 bg, float alpha)
{
float4 c = bg;
float2 d = 1 / viewportSize;
if (pos > tc.x)
{
#ifdef BORDER_ON_HIGHLIGHT
if (tc.x < d.x || tc.y >= (1 - d.y) || tc.y <= (2 * d.y - 1))
c = selectionColor;
else
#endif
c = lerp(c, fg, saturate(alpha));
}
return c;
}

float4 evaluate( float2 tc )
{
// alpha 1 indicates biased texture
float4 minmaxrms = tex1D(sTex, tc.x);
minmaxrms.rgb -= 0.15 * minmaxrms.a;
minmaxrms.rgb *= 1.8 + 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;

#if 1
float4 bgColor = backgroundColor;
#else
float a = viewportSize.x / viewportSize.y;
float2 aspect = horizontal ? float2(a, 1) : float2(1/a, 1);
float2 tcBg = float2(tc.x, -tc.y / 2 + 0.5) * aspect;
float4 bgColor = tex2D(sTexBg, tcBg);
#endif

float4 wave = outside
? bgColor
: lerp(bgColor, textColor, 3.0);

return saturate(wave);
}

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 = 2 * dx;

float4 c0 = evaluate(input.tc);
c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
c0 = bar(seekPos, input.tc, selectionColor, c0, seekWidth, seeking );
if (shade_played)
c0 = played(cursorPos, input.tc, highlightColor, c0, 0);
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();
}
}
----------------------------↑ここまで↑------------------------------

あとは、ウィンドウの透過ですが、上の画像の画面のMiscellaneousのUse transpearencyをチェックし、Opacityを任意の数値にしてみてください。
とりあえずこんな感じで近いものができてないかなと思います。

まあ、この記事はなんかの事情で私のPCの設定が消えてしまった時の備忘録代わりにもしようと思います。
スポンサーサイト



コメント

非公開コメント

プロフィール

あべ

Author:あべ
DDC:MUTEC MC3+USB
AMP:hypex FA253(x2)+hypex FA502(x2)
SP:RAAL 70-10DAM+VOLT VM527+VOLT BM165.1(x2) / Fostex T90A+Fostex H325+JBL LE85+JBL 2231A+JBL 2231H / Dayton audio ND16FA-6(x8)+Wavecor FR055WA02(x9)/
SW:Dayton Audio LS12-44(2ch)+morel UW1058(x2,mono)
CDP:TEAC PD-H600
HPA:nuforce iconHDP
HP:AKG K601
POWER:KOJO TECHNOLOGYAray MKII

にほんブログ村

オーディオ ブログランキングへ

検索フォーム

ブロとも申請フォーム