User:Beto/foobar2000

From Hydrogenaudio Knowledgebase
< User:Beto
Revision as of 13:28, 26 September 2006 by Beto (Talk | contribs)

Jump to: navigation, search

I use foobar2000 as my main media player. It is a very powerful and customizable tool, though I do not think I am a customization freak. Most stuff I just rip off from others and tweak to my personal taste. Smiley--D.png

foobar2000 current screenshot

My current foobar

This is my current foobar. It is based in columnsUI with single column playlist. The single column code is based in mazy's wonderful testcase presented here and tweaked by me.

There are also three trackinfo mod panels to display details about the current playing song and the progressbar (on top of the screenshot).

At the right you can find album art panel that displays the cover of the CD that is playing.

Right below the blue foo browser panels make it easier to navigate through the media library.

foobar2000 scripts and codes

trackinfo mod panels code

top panel

This code scrolls then title of the music if it is larger that the panel width.

//lenght of scrolling
$puts(len,70)

//title
$puts(title,$if2(%title%,No title))

//core code
$align(right,top)
$font(calibri bold,22,glow-7-123-167 glowexpand-1,255-255-255)
$if(%_isplaying%,
$iflonger($get(title),$get(len),

//scroll code
$puts(diff,$sub($len($get(title)),$get(len)))
$puts(start,$add(1,$mod(%_time_elapsed_seconds%,$get(diff))))
$puts(start2,$select($add($div($add(1,$mod( %_time_elapsed_seconds%,$mul($get(diff),2))),$add($get(diff),1)),1),$get(start),$sub($add($get(diff),1),$get(start))))
$substr($get(title),$get(start2),$add($get(start2),$get(len)))

//end of scroll code
,$get(title))$char(10)
$font(candara bold,16,shadow,)
$align(right,bottom)

//artist
$if2(%artist%,No artist)$char(10)
,
'Stopped')

//overlay image
$imageabs(0,0,images\overlay.png,)

bottom panel

// Streaming
$if(%_time_total%,,$puts(stream,1))

// Rating
$puts(rtchar,«)

// Last played
$puts(last_played_year,$substr(%last_played%,1,4))
$puts(last_played_month,$substr(%last_played%,6,7))
$puts(last_played_day,$substr(%last_played%,9,10))
$puts(last_played_hour,$substr(%last_played%,12,13))
$puts(last_played_min,$substr(%last_played%,15,16))
$puts(last_played_sec,$substr(%last_played%,18,19))

// Compression ratios
$puts(compr_perc,$muldiv(%__bitrate%,100,1411))
$puts(compr_idx,$div(100,$get(compr_perc))'.'$cut($muldiv($mod(100,$get(compr_perc)),1000,$get(compr_perc)),2))

//Core code
$align(left,top)
$font(tahoma,8,bold,255-255-255)
$if(%_isplaying%,
$if2(%genre%,No genre)' | '$if2(%style%,No style)
$align(right,top)
$if2(%album%,No album)$if(%album subtitle%,': '%album subtitle%)' | '$if2(%date%,No date)' | '$if2(%publisher%,No publisher)$char(10)
$if(%_ispaused%,$font(,,bold,255-0-0)'[Paused] ')$font(tahoma,8,bold,255-255-255)$if(%_isplaying%,'['[%_time_elapsed%]$if(%_time_total%,'/'%_time_total%)']')$if(%_isplaying%,$if($get(stream),' [Streaming]',' ['$muldiv(%_time_elapsed_seconds%,100,%_length_seconds%)'%]'))$char(10)
[%__codec%]' '[%bitrate%Kbps]
$if($stricmp(%__encoding%,lossy),
' ['%__encoding%']'$char(10)$char(10),
' ['$get(compr_perc)'%] ['%__encoding%']'$char(10)$char(10))

$if(%rating%,$font(wingdings,9,,)
$repeat($get(rtchar),%rating%)$font(,,,18-173-224)$repeat($get(rtchar),$sub(5,%rating%))$font(calibri,8,bold,255-255-255),
$font(tahoma,7,bold,255-255-255)This track has no rating)' | '
$if(%last_played%,
$ifgreater(%play_count%,1,Played %play_count% times,Played %play_count% time),
This song was never played)
$if(%last_played%,' | Last Played '$get(last_played_day)/$get(last_played_month)/$get(last_played_year)' at '$get(last_played_hour):$get(last_played_min))
,
$align(right,top)'Stopped')

progress bar

$padding(0,0)
$drawrect(,,,10,brushcolor-173-231-252 pencolor-18-173-224)

$puts(progress,$muldiv(%playback_time_seconds%,$sub(%_width%,4),%length_seconds%))

$ifgreater($get(progress),0,
$padding(2,2)$drawrect(,,$get(progress),6,brushcolor-18-173-224 pencolor-null),)

single column playlist code

group by

[%album artist%] %album%

item display

$puts(item_len,$len(%tracknumber%'. '%subalbum%': '$if($meta(album artist),%artist%' - '%title%,%title%)': '%subtitle%))
$puts(item_con,$replace([%tracknumber%'. '][%subalbum%': ']$if($meta(album artist),%artist%' - '%title%,%title%)[': '%subtitle%],'(',$font(calibri bold italic,8,$if(%isplaying%,glow-192-192-192 glowalpha-130,),$if(%_selected%,255-0-0,170-170-170))'('))
$if($strcmp($mod(%_playlist_number%,2),1),
$drawrect(,,,,brushcolor-245-245-245 pencolor-null))
$padding(2,0)
$font(calibri bold,8,$if(%isplaying%,glow-192-192-192 glowalpha-130,),$if(%_selected%,255-0-0,170-170-170))
$ifgreater($get(item_len),182,
$cut($get(item_con),181)'...',
$get(item_con)
)
$alignabs(6,13,%_width%,%_height%,,)
$font(CubicFive10,5,nocleartype,190-190-190)
[%length% | ]
[$info(bitrate) kbps]
$alignabs(0,-1,$sub(%_width%,36),%_height%,right,)
$if($not(%__replaygain_track_gain%),$font(,,,255-0-0)T,)
$if($not(%__replaygain_album_gain%),$font(,,,255-0-0)A,)
$alignabs(0,-1,$sub(%_width%,2),%_height%,right,)
$font(CubicFive10,5,nocleartype,190-190-190)
[%play_count%x]
//$if(%cwb_queueindex%, '['%cwb_queueindexes%/%cwb_queuelength%']')
$alignabs(0,10,$sub(%_width%,2),%_height%,right,)
$font(Wingdings,8,glow-190-190-190 glowexpand-1,250-250-250)
$repeat(«,%rating%)

group display

$puts(ar_w,$calcwidth($longest(%album artist%,%artist%)))
$padding(1,0)
$drawrect(,,,,brushcolor-119-213-249 pencolor-51-191-238)$padding(4,1)
$align(left,top)$font(calibri bold,8,,255-255-255)
$font(,,bold glow-51-191-238,)
%album%[': '%album subtitle%]
$alignabs(0,0,$sub(%_width%,$get(ar_w),14),%_height%,right,)
$font(cubicfive10,5,,18-173-224)
[%encodedby%]
$align(right,top)$font(calibri bold,8,,255-255-255)
$if2(%album artist%,%artist%)
$drawrect($sub(%_width%,$get(ar_w),18),-1,3,%_height%,brushcolor-51-191-238 pencolor-null)
$drawrect($sub(%_width%,$get(ar_w),17),-1,1,%_height%,brushcolor-250-250-250 pencolor-null)
$alignabs(6,15,%_width%,%_height%,,)
$font(CubicFive12,5,nocleartype,18-173-224)
[%date% | ][%genre%][ | %publisher%]
$alignabs(0,14,$sub(%_width%,$get(ar_w),14),%_height%,right,)
$font(cubicfive10,5,,)
[%rippedby%]
$imageabs($sub(%_width%,$get(ar_w),98),0,images\playlist-refl.png,)
$imageabs($sub(%_width%,87),0,images\playlist-refl.png,)