Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: HTPC Fullscreen panels (Read 50647 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

HTPC Fullscreen panels

News
2008-10-23: Added htpc10.v1.0
2008-09-16: Added htpc9.v1.1

How to use (generally)
Setup a layout in columns ui like the following one:
Code: [Select]
Vertical splitter
+- Track display [or trackinfo_mod panel]
\- Columns playlist [hidden]

The hidden columns playlist makes keyboard shortcuts work.

How to set coverPath and artistPath
htpc1 - htpc7 were written in times of panels_ui where user variables could been set globally. If those configs are used with trackinfo_mod, artistPath and coverPath must been set manually in the top lines (i.e. in the "// Globals" section) of the trackinfo_mod code for example like this:
Code: [Select]
$puts(coverPath,$replace(%path%,%filename_ext%,folder.jpg))
$puts(artistPath,$replace(%path%,$directory(%path%,1)\%filename_ext%,folder.jpg))


htpc1
  • Uses font Gentium
  • Stretches artist picture to panel size


Track display code and pictures (copy to images\htpc1\ in your fb2k directory):
[attachment=4349:attachment]


htpc4
  • Shows album cover and artist pic (uses user globals)
  • easy usage: just use the code below; no additional images required
  • quite resolution independent; album art size easily modifiable


Download: code for
[attachment=4658:attachment] v1.0 (compatible only with panels_ui due to $eval)
[attachment=4660:attachment] v1.1 (compatible with trackinfo_mod, modifications by scienceguy8m)


htpc6
  • Easy installation: Only copy code below
  • Uses artistPath and coverPath
  • Very well structured code (good for personal modifications), easy to adapt to other resolutions (if necessary at all)
  • Font used: Big Noodle Titling
  • Progress bar around album art


Download: panels_ui track display code (needs editing to be compatible with trackinfo_mod)
[attachment=4659:attachment]


htpc7
  • Credits go to Cyex for his CD cover picture
  • Playback buttons (pause on cover, next and previous track on left/right)
  • Small scpl panel on the cover can be activated for quick browsing in the current playlist (==> only usable for mouse)
  • When hotness is used, the cover glows to indicate hot tracks
  • Quite resolution independent (horizon position and text sizes must be tweaked a bit in the configuration part to look good)




Track display and SCPL codes, pictures and installation notices (readme.txt):
[attachment=4347:attachment]



htpc9
  • Compatible with foo_uie_trackinfo_mod and panels_ui track display
  • Intended for fullscreen use but automatically scales very well also to small size (refer to screenshot #3).
  • Well structured configuration section at top for changing stuff like picture paths or colors.
  • Album art "glows" dependent on a user-selectable value. I use it in combination with hotness, but also rating or any other ordinal size can be used, too.
  • Artist art at the beginning and end of track


Download: trackinfo_mod code and pictures (put those into a folder images/htpc9 in your foobar2000 installation folder):
[attachment=4662:attachment]



htpc10
  • Cover image with glow, optional additional artist picture support
  • Text in symbol line shows play count, album and release date periodically
  • Rating (star) and mood/energy (sun) symbols. Can easily modified to visualise other values.
  • Playback order symbols (only with foo_cwb_hooks)


Download: trackinfo_mod code and pictures (put those into a folder named images/htpc10 in your foobar2000 installation folder):
[attachment=4713:attachment]

HTPC Fullscreen panels

Reply #1
Hi
Really Nice share

Can you recapitulate all the config you share in this topic please.

ANd for Htpc4 is there a way to make that the artist image is not deformed but only adapt it self on the height of the screen  .??

HTPC Fullscreen panels

Reply #2
ANd for Htpc4 is there a way to make that the artist image is not deformed but only adapt it self on the height of the screen  .??


Yes, but this dependent on a) your source file format and b) your screen aspect ratio. My code reflects the computations necessary for 4:3-pictures to be cropped suiting my 16:9 resolution (top and bottom is cut away)

Code: [Select]
// Artist photo
$imageabs2(%_width%,$muldiv(%_width%,3,4),0,$div($sub($muldiv(%_width%,3,4),%_height%),2),%_width%,%_height%,0,0,$get(path.artistart),NOKEEPASPECT NOCACHE)


Refer to the Reference for $imageabs2 for a detailed description:
The second argument sets the "resize-to" height of the picture, for me it is 0.75*%_width% (4:3 pics), it would be exactly 1*%_width% for squared pictures. Then the fourth argument with $div(...): This cuts away half of the invisible part at the top so that the cropped sections are at bottom and top of the source picture. In every case, a persistent source picture format is necessary for all pictures to be shown without deformations.

HTPC Fullscreen panels

Reply #3
Do you know any good source of high quality artist art? A small jpeg scaled up on a HDTV doesn't look so great.

HTPC Fullscreen panels

Reply #4
Do you know any good source of high quality artist art?


I must disappoint you, I just use Google Image Search (restricted to large and very large pictures). If that doesn't bring good results, I also look for the band's homepage or on Wikipedia. Also fanpages sometimes have good galleries. It's some work, but I think it's worth the effort... 

One recommendation: Crop all pictures to the same aspect ratio (e.g. 1:1, 4:3 or 16:9) to make it easier to show them later without stretching.

Good look for hunting!
ojdo

HTPC Fullscreen panels

Reply #5
hello:

i only get the total times played, but not the %last_played% in your config htpc7.
i think there something wrong with this:

Code: [Select]
$if(%last_played%,
    $get(font.a)Bisher $get(font.b)%play_count%$get(font.a)mal gehört
    $ifgreater($get_global(lp_diff),0,', 'zuletzt am $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),)
    $ifgreater($get_global(age),0,', 'das erste Mal am $get(font.b)$substr(%first_played%,9,10). $select($substr(%first_played%,6,7),Januar,Februar,März,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember) $substr(%first_played%,1,4)$get(font.a),).
,


where's the (lp-diff) and (age) globals? in the code?

thanks 
more or less, minus is best

HTPC Fullscreen panels

Reply #6
where's the (lp-diff) and (age) globals? in the code?

Arg, thanks for reporting this... I use columns_ui's $set_global function in the preferences to calculate globals only once: age (since when is the song in my collection), lp-diff (when - relative to today - was the song heared last time?) [and hotness]:

Code: [Select]
$set_global(lp_diff,$cwb_datediff(%cwb_systemdate%,%last_played%))
$set_global(age,$cwb_datediff(%cwb_systemdate%,%first_played%))


I do that to prevent today's date to be shown too often (like in "Heared 1 time, last time $today, first time $today", which sounds quite silly to me). When I make an update, I will include as much as possible in the code above. Now I see, that also some colours are set in my private panels_ui user globals (like artistPath and coverPath).

HTH
ojdo

HTPC Fullscreen panels

Reply #7
thanks ... it works now

i acommodate the code in columns ui -- prefs -- globals and the track info shows now the last played OK...
now i only must translate into english 

great code ... i use your htpc7 (and old versions) since one year or more!

sorry my bad english!
more or less, minus is best

HTPC Fullscreen panels

Reply #8
great code ... i use your htpc7 (and old versions) since one year or more!

Thanks, I am glad to hear that the configs are useful for you. I am also open for suggestions for future versions ...

HTPC Fullscreen panels

Reply #9
Hi,
nice config's. I have question: would You add playlist dropdown and quicksearch toolbar?
thx

HTPC Fullscreen panels

Reply #10
nice config's. I have question: would You add playlist dropdown and quicksearch toolbar?

Definitely not as I use these views for listening, not for browsing music. However thanks for the input.

HTPC Fullscreen panels

Reply #11
Hey, I am trying out your config on my living room HDTV

Doing htpc-4

However, i cant figure out how to remove the top system menu with the application title and windows control buttons for minimize/maximize/exit.

I tried following some of your links and found that you said:

"Removed foo's titlebar with autohotkey"

I downloaded autohotkey but cant figure out how to do it. Any help? =)

My system is:
-Vista
-foobar 9.5.4
-newest panels ui and columns ui to date (3 sep 2008)

HTPC Fullscreen panels

Reply #12
Hmm, shame there's no easy way to do this. I've recently started controlling my foobar2000 from my tablet via telnet. And this is one of the really nice ones that display artist, song title, and album art nice and big so I can see it from my bed. (usually when I'm at my laptop I would just settle for the default view).

HTPC Fullscreen panels

Reply #13
I downloaded autohotkey but cant figure out how to do it. Any help? =)


This autohotkey code might be a start:
Code: [Select]
#IfWinActive ahk_class {E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}; Foobar2000

^!f::
++CurrentLayout
if (CurrentLayout==3)
  CurrentLayout = 1
if (CurrentLayout==1)
  send ^{Numpad1}            ; switch to layout 1...
  WinSet, Style, +0xC00000, A; ... and restore titlebar
if (CurrentLayout==2)
   WinSet, Style, -0xC00000, A; remove titlebar...
   send ^{Numpad2}            ; ... and switch to layout 2
return


This makes Ctrl+Alt+F at toggle button for foobar2000 only which presses Ctrl+1(Numpad) and Ctrl+2(Numpad) alternately. These key strokes are bind to Columns UI layouts and the WinSet function then removes or restores the titlebar. Tested only under WinXP so I don't know if it still works this way.

HTPC Fullscreen panels

Reply #14

I downloaded autohotkey but cant figure out how to do it. Any help? =)


This autohotkey code might be a start:
Code: [Select]
#IfWinActive ahk_class {E7076D1C-A7BF-4f39-B771-BCBE88F2A2A8}; Foobar2000

^!f::
++CurrentLayout
if (CurrentLayout==3)
  CurrentLayout = 1
if (CurrentLayout==1)
  send ^{Numpad1}        ; switch to layout 1...
  WinSet, Style, +0xC00000, A; ... and restore titlebar
if (CurrentLayout==2)
   WinSet, Style, -0xC00000, A; remove titlebar...
   send ^{Numpad2}        ; ... and switch to layout 2
return


This makes Ctrl+Alt+F at toggle button for foobar2000 only which presses Ctrl+1(Numpad) and Ctrl+2(Numpad) alternately. These key strokes are bind to Columns UI layouts and the WinSet function then removes or restores the titlebar. Tested only under WinXP so I don't know if it still works this way.

Thank you for the quick reply, I have now tested it in Vista and it works =)

If anyone else tries this in vista, remember to start autohotkey as admin (took me some time to find that out) But then i works like a charm =)

HTPC Fullscreen panels

Reply #15
Sorry about the newb question, but I love your config and I want to get it to work.  Where and how do I set the globals so that it will read in my album and artist arts?  My album art will always be folder.jpg and my artist art will always be artist.jpg, with folder art kept in the same folder as the tracks themselves, and the artist art in a separate folder from my music.  Thank you in advance!

HTPC Fullscreen panels

Reply #16
Where and how do I set the globals so that it will read in my album and artist arts?


I added a section explaining it to the first post. Basically, when used with the foo_uie_trackinfo_mod.dll you must add $puts(coverPath,CODE FOR YOUR COVER PICTURE) and $puts(artistPath,CODE THAT DELIVERS PATH TO ARTIST PICTURE) to the "// Globals" section of the corresponding trackinfo_mod code. (In times of panels_ui this setting could be made in Preferences in a seperate code box to make this info viewable for all panels using it.)

HTPC Fullscreen panels

Reply #17

Where and how do I set the globals so that it will read in my album and artist arts?


I added a section explaining it to the first post. Basically, when used with the foo_uie_trackinfo_mod.dll you must add $puts(coverPath,CODE FOR YOUR COVER PICTURE) and $puts(artistPath,CODE THAT DELIVERS PATH TO ARTIST PICTURE) to the "// Globals" section of the corresponding trackinfo_mod code. (In times of panels_ui this setting could be made in Preferences in a seperate code box to make this info viewable for all panels using it.)


Thanks for the super quick reply, it looks better now.  All I have to do now is find time to get all of the artist/album pictures in high quality...

As a note, in your first line of code for the art globals you're missing a closing parenthesis.  The code should be:
Code: [Select]
$puts(coverPath,$replace(%path%,%filename_ext%,folder.jpg))


Another question.  I have attached a screenshot of my config and as you can see from the screenshot all is not as it should be.  Primarily, the background bar doesn't line up with the album art, and the rating and mood bars are not sized/positioned correctly.  When I play a song with a rating, the rating extends the entire width of the screen.  Are there more variables that I should be configuring?

Thanks again!

[attachment=4657:attachment]

HTPC Fullscreen panels

Reply #18
One possible cause of your screenshot could be that the variable "albumart.size" is not properly set (or set to value 0) in your code (see the frame of the albumart picture).

But I fear that foo_uie_trackinfo_mod doesn't have the $eval-function. I then recommend you to use htpc9 which was written especially for trackinfo_mod (and doesn't use $eval). Alternatively, you would have to replace all uses of $eval like $eval(a+b*c) with $sum(a,$mul(b,c)) which would be a bit of work...

HTPC Fullscreen panels

Reply #19
One possible cause of your screenshot could be that the variable "albumart.size" is not properly set (or set to value 0) in your code (see the frame of the albumart picture).

But I fear that foo_uie_trackinfo_mod doesn't have the $eval-function. I then recommend you to use htpc9 which was written especially for trackinfo_mod (and doesn't use $eval). Alternatively, you would have to replace all uses of $eval like $eval(a+b*c) with $sum(a,$mul(b,c)) which would be a bit of work...

Replacing the $eval functions with $add or $sub wasn't too much work and seemed to do the trick.  Thanks again for your help.  I've included the code for anyone else who would like to use htpc4 and doesn't want to have to change the code.  As-is it is dependent on using folder.jpg for your album art and artist.jpg for your artist art.

Code: [Select]
// Name: HTPC4
// Version: 1.0
// ---
// Description: A fullscreen trackinfo_mod/track display config for foobar2000
// Author: ojdo

// Global
$puts(coverPath,$replace(%path%,%filename_ext%,folder.jpg))
$puts(artistPath,$replace(%path%,%filename_ext%,artist.jpg))

$puts(path.artistart,$get(artistPath))
$puts(path.albumart,$get(coverPath))

$puts(font.a,$font(Arial,16,,120-120-120))
$puts(font.b,$font(Arial,16,,255-255-255))
$puts(swap.time,10)
$puts(swap.number,2)
$puts(col.border,60-60-60)
$puts(albumart.size,450)

// Background
$drawrect(0,0,0,0,pencolor-null brushcolor-5-5-5)


// PerTrack

// Artist photo
$imageabs2(%_width%,$muldiv(%_width%,3,4),0,$div($sub($muldiv(%_width%,3,4),%_height%),2),%_width%,%_height%,0,0,$get(path.artistart),NOKEEPASPECT NOCACHE)

$if(%title%,
// Panel bg
$drawrect(16,$sub(%_height%,226),$sub(%_width%,32),210,pencolor-0-0-0 alpha-220)

// Title
$alignabs($add(90,$get(albumart.size)),$sub(%_height%,234),$sub(%_width%,$get(albumart.size),90,40),110,left,bottom)
'#LINEHEIGHT,44#'
$font(Calibri,40,,255-255-255)
$if2(%title%,Unknown Title)
'#LINEHEIGHT,59#'

// Artist
$alignabs($add(90,$get(albumart.size)),$sub(%_height%,125),$sub(%_width%,$get(albumart.size),90,40),40,left,bottom)
$font(Calibri,24,,255-255-255)
$if2(%artist%,Unknown Artist)

,

// Nothing to display
$alignrel(center,middle)
$font(Calibri,40,,255-255-255)
No track loaded
)

// Album art
$if($get(path.albumart),
$drawrect(58,$sub(%_height%,$get(albumart.size),62),$add($get(albumart.size),4),$add($get(albumart.size),4),pencolor-$get(col.border) brushcolor-null)
$imageabs2($get(albumart.size),$get(albumart.size),0,0,$get(albumart.size),$get(albumart.size),60,$sub(%_height%,$get(albumart.size),60),$get(path.albumart),NOKEEPASPECT)
)

// Pause overlay
$if(%ispaused%,$if($get(path.albumart),
$drawrect(60,$sub(%_height%,$get(albumart.size),60),$get(albumart.size),$get(albumart.size),pencolor-0-0-0 alpha-150)
$alignabs(60,$sub(%_height%,$get(albumart.size),60),$get(albumart.size),$get(albumart.size),center,middle)$font(Webdings,100,,255-255-255)';'
,
$alignabs(60,$sub(%_height%,150,60),$get(albumart.size),150,center,middle)$font(Webdings,100,,255-255-255)';'
))

// Rating
$ifgreater(%rating%,0,
$drawrect(60,$sub(%_height%,42),$muldiv(%rating%,$sub($muldiv(220,$get(albumart.size),400),4),5),7,pencolor-null brushcolor-255-128-0)
,)
$drawrect(58,$sub(%_height%,44),$muldiv(220,$get(albumart.size),400),11,pencolor-$get(col.border) brushcolor-null)

// Mood
$ifgreater(%mood%,0,
$drawrect($add(60,$muldiv(220,$get(albumart.size),400),30),$sub(%_height%,42),$muldiv(%mood%,$sun($sub($get(albumart.size),$muldiv(220,$get(albumart.size),400),26),4),3),7,pencolor-null brushcolor-0-255-0)
,)
$drawrect($add(58,$muldiv(220,$get(albumart.size),400),30),$sub(%_height%,44),$sub($get(albumart.size),$muldiv(220,$get(albumart.size),400),26),11,pencolor-$get(col.border) brushcolor-null)

// PerSecond

// Third line

$alignabs($add($get(albumart.size),90),$sub(%_height%,85),$sub(%_width%,$get(albumart.size),90,40),30,left,bottom)

$select($add($mod($div($right(%cwb_systemdatetime%,2),$get(swap.time)),$get(swap.number)),1),
// A
$get(font.a)
$if(%album%,$get(font.b)%album%$get(font.a))
$if(%date%, '('$get(font.b)%date%$get(font.a)')')
$if(%tracknumber%,',' Track $get(font.b)$num(%tracknumber%,1)$get(font.a)$if(%totaltracks%,'/'$get(font.b)$num(%totaltracks%,1)$get(font.a))$if(%disc%, '('CD $get(font.b)%disc%$get(font.a)')'))
,
// B
$if(%last_played%,$get(font.a)Bisher $get(font.b)$if2(%play_counter%,0)$get(font.a)mal gehört', 'zuletzt am $get(font.b)$substr(%last_played%,9,10). $select($substr(%last_played%,6,7),January,February,March,April,May,June,July,August,September,October,November,December) $substr(%last_played%,1,4)$get(font.a).,$get(font.a)Bisher noch $get(font.b)nie$get(font.a) gehört.)
)

// Progress bar
$puts(width,$muldiv(%_time_elapsed_seconds%,$sub(%_width%,$get(albumart.size),90,60,4),%_length_seconds%))
$ifgreater($get(width),0,$drawrect($add($get(albumart.size),92),$sub(%_height%,42),$get(width),7,pencolor-null brushcolor-$if($strstr(%cwb_playback_order%,Shuffle),128-0-255,0-128-255)),)
$drawrect($add($get(albumart.size),90),$sub(%_height%,44),$sub(%_width%,$get(albumart.size),90,60),11,pencolor-$get(col.border) brushcolor-null)

Edit: Changed to codebox to clean things up a bit (learn something new every day).

HTPC Fullscreen panels

Reply #20
Thank you very much. Is it ok that I included your code in the first post (with credits)? If not please say so that I can remove it again. (Hint: Please edit your post to use a [ codebox ] instead of [ code ] which makes the thread easier to read.)

I'm always glad to see that this is actually useful for someone else! 

Edit: Added htpc9.v1.1 to first post

HTPC Fullscreen panels

Reply #21
That's perfectly fine, I appreciate the credits (though honestly 99% of the credit goes to you!).

HTPC Fullscreen panels

Reply #22
great new config - stylish and classy.

BUT how does the glow work out? not sure, and the config says something about a hotness rating?

and on the side, is there a way to make the panel work as an actual full screen display?

thanks a bunch

HTPC Fullscreen panels

Reply #23
great new config - stylish and classy.

Thanks, glad to hear that.
Quote
BUT how does the glow work out? not sure, and the config says something about a hotness rating?

See the hotness for details. In short: Tracks played often and/or recently glow; high rated tracks glow more than low rated ones. The hotness value depends on the current date so that without repeated listenning, a song finally "cools down". In playlist browsing it's quite useful for me; here it's mainly eye-candy. You can enter any other value like %rating% to be visualised in the glowing effect. Or set the value to 0 to disable the feature.
Quote
and on the side, is there a way to make the panel work as an actual full screen display?

Short answer: No.
Long answer: No, but you can try the program AutoHotkey which allows to set window types of other applications. I tried it and now I just stick to slim, dark Visual Styles which is much less buggy than the external modification of window properties.

HTH
ojdo

HTPC Fullscreen panels

Reply #24
is it true that cwb_hooks is not compatible with the current version of foobar? (0.9.5.6)