I'm not sure this post is helpful for anyone, as this layout mainly profits from high resolution artist photos which are a pain to find/download. If no artist photo is found, this code shows a generic picture of the type of audio file (soundtrack, game music, sampler, ...). This easily could be changed to a "picture per genre" or something different if no pictures for all artists are available.
The code here is not completely quite independant from screen resolution (mostly obvious stuff like width and height of imageabs2-resizes). If requested I could fix that easily. Done.
Screenshots
[a href=\"http://www.galsch.de/files/open/screenshots/2007-01-15-fb2k-htpc-3.png\" target=\"_blank\"]
The rest of the time: Artist photo and album art presentation.
Downloads- Images. Extract to your foobar's image directory.
- The font used: Gentium.
Trackinfo mod code (as shown in screenshots)
// Global
$puts(path.library,'D:\Audio')
$puts(art.h,$sub(%_height%,351))
$puts(pos.x1,71)
$puts(pos.y1,$add(-134,$get(art.h)))
$puts(pos.y2,86)
// - Fonts used for additional info
$puts(font.a,$font(Gentium,20,glow-19-19-19 glowexpand-1 glowblur-8,160-160-160))
$puts(font.b,$font(Gentium,20,bold glow-19-19-19 glowexpand-1 glowblur-8,220-210-210))
// Background
$drawrect(,,,,brushcolor-19-19-19 pencolor-null)
$imageabs($sub(%_width%,198),$sub(%_height%,$get(pos.y2),44),images\htpc1\addinfo.png,)
// PerTrack
// Artist photo
$if($fileexists($get(path.library)\Alben\%artist%\folder.jpg),$imageabs2(%_width%,%_height%,0,0,%_width%,$get(art.h),0,0,$get(path.library)\Alben\%artist%\folder.jpg,nokeepaspect),
$if($fileexists($get(path.library)\Singles\%artist%\folder.jpg),$imageabs2(%_width%,%_height%,0,0,%_width%,$get(art.h),0,0,$get(path.library)\Singles\%artist%\folder.jpg,nokeepaspect),
$if($fileexists($replace(%path%,$if(%disc%,$directory(%path%,2)\)$directory(%path%,1)\%filename_ext%,)folder.jpg),$imageabs2(%_width%,%_height%,0,0,%_width%,$get(art.h),0,0,$replace(%path%,$if(%disc%,$directory(%path%,2)\)$directory(%path%,1)\%filename_ext%,)folder.jpg,nokeepaspect),
$if($strstr(%path%,\Alben\),$imageabs2(%_width%,%_height%,0,0,%_width%,$get(art.h),0,0,$get(path.library)\Alben\folder.jpg,nokeepaspect),
$if($strstr(%path%,\Sampler\),$imageabs2(%_width%,%_height%,0,0,%_width%,$get(art.h),0,0,$get(path.library)\Sampler\folder.jpg,nokeepaspect),
$if($strstr(%path%,\Soundtrack\),$imageabs2(%_width%,%_height%,0,0,%_width%,$get(art.h),0,0,$get(path.library)\Soundtrack\folder.jpg,nokeepaspect),
$if($strstr(%path%,\Spiele\),$imageabs2(%_width%,%_height%,0,0,%_width%,$get(art.h),0,0,$get(path.library)\Spiele\folder.jpg,nokeepaspect),
$if($strstr(%path%,\Sprache\),$imageabs2(%_width%,%_height%,0,0,%_width%,$get(art.h),0,0,$get(path.library)\Sprache\folder.jpg,nokeepaspect),
$if($strstr(%path%,\Web\),$imageabs2(%_width%,%_height%,0,0,%_width%,$get(art.h),0,0,$get(path.library)\Web\folder.jpg,nokeepaspect),
$imageabs2(%_width%,%_height%,0,0,%_width%,$get(art.h),0,0,/images\bg\12.png,nokeepaspect)
)))))))))
$imageabs2(%_width%,$add(1,$get(art.h)),0,0,%_width%,$add(1,$get(art.h)),0,0,images\htpc1\artist-overlay2.png,nokeepaspect)
// Album art
$imageabs($get(pos.x1),$get(pos.y1),images\htpc1\cd.png,)
$imageabs($get(pos.x1),$get(pos.y1),images\htpc1\case.png,)
$if($fileexists($replace(%path%,$if(%disc%,$directory(%path%,1)\)%filename_ext%,)folder.jpg),
$imageabs2(300,300,0,0,300,300,$add(44,$get(pos.x1)),$add(18,$get(pos.y1)),$replace(%path%,$if(%disc%,$directory(%path%,1)\)%filename_ext%,)folder.jpg,nokeepaspect),
)
$imageabs($get(pos.x1),$get(pos.y1),images\htpc1\gloss.png,)
$if(%disc%,$imageabs($get(pos.x1),$get(pos.y1),images\htpc1\2cd.png,))
// Title - Artist
$alignabs($add($get(pos.x1),500),$add($get(pos.y1),136),$sub(%_width%,$get(pos.x1),500,82),200,right,middle)
$font(Gentium,36,glow-100-100-100 glowblur-38 glowexpand-1,205-191-171)
[%title%]$char(10)
$font(Gentium,24,glow-80-80-80 glowblur-20 glowexpand-1,190-175-155)
[%artist%]
// PerSecond
// Progress bar
$ifgreater(%playback_time_seconds%,0,
$drawrect(0,$sub(%_height%,$get(pos.y2)),$add(23,$muldiv(%playback_time_seconds%,%_width%,%length_seconds%)),4,pencolor-null brushcolor-0-128-255)
$imageabs($muldiv(%playback_time_seconds%,%_width%,%length_seconds%),$sub(%_height%,$get(pos.y2)),images\htpc1\progress2.png,)
,)
// Additional info
$if($or($greater(30,%playback_time_seconds%),$greater(30,%playback_time_remaining_seconds%)),
$alignabs($sub(%_width%,$get(pos.x1),500),$add($get(pos.y1),-100),500,200,right,bottom)
$if(%last_played%,$get(font.a)Bisher $get(font.b)%play_counter%$get(font.a)mal gehört', 'zuletzt am $char(10)$get(font.b)$substr(%last_played%,9,10). $select($substr(%last_played%,6,7),Januar,Februar,März,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember) $substr(%last_played%,1,4)$get(font.a).$char(10))
$if(%playback_time_seconds%,$get(font.a)Erschienen $if(%date%,im Jahr $get(font.b)%date%$get(font.a) )$if(%publisher%,bei $get(font.b)%publisher%$get(font.a) )$if(%album%,auf dem Album $get(font.b)%album%$get(font.a)).)
)
// Info squares
$font(Arial Unicode MS,18,glow-64-64-64 glowblur-5 glowexpand-1,19-19-19)
$alignabs($sub(%_width%,211),$sub(%_height%,$get(pos.y2),58),60,60,center,middle)[%rating%]
$alignabs($sub(%_width%,177),$sub(%_height%,$get(pos.y2),58),60,60,center,middle)[%mood%]
$alignabs($sub(%_width%,144),$sub(%_height%,$get(pos.y2),58),60,60,center,middle)$if($strcmp(%cwb_playback_order%,'Shuffle (tracks)'),S)
// Pause overlay
$if(%ispaused%,
$drawrect($add(44,$get(pos.x1)),$add(18,$get(pos.y1)),300,300,pencolor-0-0-0 alpha-150)
$alignabs($add(44,$get(pos.x1)),$add(18,$get(pos.y1)),300,300,center,middle)$font(Webdings,72,,255-255-255)';'
)
Variant B: Lower part transparent
// Global
$puts(path.library,'D:\Audio')
$puts(art.h,$sub(%_height%,351))
$puts(pos.x1,71)
$puts(pos.y1,$add(-134,$get(art.h)))
$puts(pos.y2,86)
// - Fonts used for additional info
$puts(font.a,$font(Gentium,20,glow-19-19-19 glowexpand-1 glowblur-8,160-160-160))
$puts(font.b,$font(Gentium,20,bold glow-19-19-19 glowexpand-1 glowblur-8,220-210-210))
// Background
$drawrect(,,,,brushcolor-19-19-19 pencolor-null)
// PerTrack
// Artist photo
$if($fileexists($get(path.library)\Alben\%artist%\folder.jpg),$imageabs2(%_width%,%_height%,0,0,%_width%,%_height%,0,0,$get(path.library)\Alben\%artist%\folder.jpg,nokeepaspect),
$if($fileexists($get(path.library)\Singles\%artist%\folder.jpg),$imageabs2(%_width%,%_height%,0,0,%_width%,%_height%,0,0,$get(path.library)\Singles\%artist%\folder.jpg,nokeepaspect),
$if($fileexists($replace(%path%,$if(%disc%,$directory(%path%,2)\)$directory(%path%,1)\%filename_ext%,)folder.jpg),$imageabs2(%_width%,%_height%,0,0,%_width%,%_height%,0,0,$replace(%path%,$if(%disc%,$directory(%path%,2)\)$directory(%path%,1)\%filename_ext%,)folder.jpg,nokeepaspect),
$if($strstr(%path%,\Alben\),$imageabs2(%_width%,%_height%,0,0,%_width%,%_height%,0,0,$get(path.library)\Alben\folder.jpg,nokeepaspect),
$if($strstr(%path%,\Sampler\),$imageabs2(%_width%,%_height%,0,0,%_width%,%_height%,0,0,$get(path.library)\Sampler\folder.jpg,nokeepaspect),
$if($strstr(%path%,\Soundtrack\),$imageabs2(%_width%,%_height%,0,0,%_width%,%_height%,0,0,$get(path.library)\Soundtrack\folder.jpg,nokeepaspect),
$if($strstr(%path%,\Spiele\),$imageabs2(%_width%,%_height%,0,0,%_width%,%_height%,0,0,$get(path.library)\Spiele\folder.jpg,nokeepaspect),
$if($strstr(%path%,\Sprache\),$imageabs2(%_width%,%_height%,0,0,%_width%,%_height%,0,0,$get(path.library)\Sprache\folder.jpg,nokeepaspect),
$if($strstr(%path%,\Web\),$imageabs2(%_width%,%_height%,0,0,%_width%,%_height%,0,0,$get(path.library)\Web\folder.jpg,nokeepaspect),
$imageabs2(%_width%,%_height%,0,0,%_width%,%_height%,0,0,/images\bg\12.png,nokeepaspect)
)))))))))
// Artist overlays
$imageabs2(%_width%,$add(1,$get(art.h)),0,0,%_width%,$add(1,$get(art.h)),0,0,images\htpc1\artist-overlay2.png,nokeepaspect)
$drawrect(,$get(art.h),,,brushcolor-19-19-19 pencolor-19-19-19 alpha-180)
$imageabs($sub(%_width%,198),$sub(%_height%,$get(pos.y2),44),images\htpc1\addinfo.png,)
// Album art
$imageabs($get(pos.x1),$get(pos.y1),images\htpc1\cd.png,)
$imageabs($get(pos.x1),$get(pos.y1),images\htpc1\case.png,)
$if($fileexists($replace(%path%,$if(%disc%,$directory(%path%,1)\)%filename_ext%,)folder.jpg),
$imageabs2(300,300,0,0,300,300,$add(44,$get(pos.x1)),$add(18,$get(pos.y1)),$replace(%path%,$if(%disc%,$directory(%path%,1)\)%filename_ext%,)folder.jpg,nokeepaspect),
)
$imageabs($get(pos.x1),$get(pos.y1),images\htpc1\gloss.png,)
$if(%disc%,$imageabs($get(pos.x1),$get(pos.y1),images\htpc1\2cd.png,))
// Title - Artist
$alignabs($add($get(pos.x1),500),$add($get(pos.y1),136),$sub(%_width%,$get(pos.x1),500,82),200,right,middle)
$font(Gentium,36,glow-100-100-100 glowblur-38 glowexpand-1,205-191-171)
[%title%]$char(10)
$font(Gentium,24,glow-80-80-80 glowblur-20 glowexpand-1,190-175-155)
[%artist%]
// PerSecond
// Progress bar
$ifgreater(%playback_time_seconds%,0,
$drawrect(0,$sub(%_height%,$get(pos.y2)),$add(23,$muldiv(%playback_time_seconds%,%_width%,%length_seconds%)),4,pencolor-0-128-255 brushcolor-0-128-255 alpha-180)
,)
// Additional info
$if($or($greater(30,%playback_time_seconds%),$greater(30,%playback_time_remaining_seconds%)),
$alignabs($sub(%_width%,$get(pos.x1),500),$add($get(pos.y1),-100),500,200,right,bottom)
$if(%last_played%,$get(font.a)Bisher $get(font.b)%play_counter%$get(font.a)mal gehört', 'zuletzt am $char(10)$get(font.b)$substr(%last_played%,9,10). $select($substr(%last_played%,6,7),Januar,Februar,März,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember) $substr(%last_played%,1,4)$get(font.a).$char(10))
$if(%playback_time_seconds%,$get(font.a)Erschienen $if(%date%,im Jahr $get(font.b)%date%$get(font.a) )$if(%publisher%,bei $get(font.b)%publisher%$get(font.a) )$if(%album%,auf dem Album $get(font.b)%album%$get(font.a)).)
)
// Info squares
$font(Arial Unicode MS,18,glow-64-64-64 glowblur-5 glowexpand-1,19-19-19)
$alignabs($sub(%_width%,211),$sub(%_height%,$get(pos.y2),58),60,60,center,middle)[%rating%]
$alignabs($sub(%_width%,177),$sub(%_height%,$get(pos.y2),58),60,60,center,middle)[%mood%]
$alignabs($sub(%_width%,144),$sub(%_height%,$get(pos.y2),58),60,60,center,middle)$if($strcmp(%cwb_playback_order%,'Shuffle (tracks)'),S)
// Pause overlay
$if(%ispaused%,
$drawrect($add(44,$get(pos.x1)),$add(18,$get(pos.y1)),300,300,pencolor-0-0-0 alpha-150)
$alignabs($add(44,$get(pos.x1)),$add(18,$get(pos.y1)),300,300,center,middle)$font(Webdings,72,,255-255-255)';'
)