HTPC Fullscreen panels, to show of Album and Artist art |
![]() ![]() |
HTPC Fullscreen panels, to show of Album and Artist art |
Apr 2 2008, 22:16
Post
#1
|
|
![]() Group: Members Posts: 881 Joined: 18-June 06 From: Germany Member No.: 31980 |
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 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 $puts(coverPath,$replace(%path%,%filename_ext%,folder.jpg)) $puts(artistPath,$replace(%path%,$directory(%path%,1)\%filename_ext%,folder.jpg)) htpc1
Track display code and pictures (copy to images\htpc1\ in your fb2k directory):
htpc1.zip ( 235.5K )
Number of downloads: 666htpc4
Download: code for
htpc4.txt ( 4.17K )
Number of downloads: 399v1.0 (compatible only with panels_ui due to $eval)
htpc4.v1.1.txt ( 4.51K )
Number of downloads: 444v1.1 (compatible with trackinfo_mod, modifications by scienceguy8m) htpc6
Download: panels_ui track display code (needs editing to be compatible with trackinfo_mod)
htpc6.txt ( 8.29K )
Number of downloads: 496htpc7
Track display and SCPL codes, pictures and installation notices (readme.txt):
htpc7.zip ( 255.29K )
Number of downloads: 837htpc9
Download: trackinfo_mod code and pictures (put those into a folder images/htpc9 in your foobar2000 installation folder):
htpc9.v1.1.zip ( 81.5K )
Number of downloads: 414htpc10
Download: trackinfo_mod code and pictures (put those into a folder named images/htpc10 in your foobar2000 installation folder):
htpc10.v1.0.zip ( 155K )
Number of downloads: 703This post has been edited by ojdo: Oct 23 2008, 16:43 -------------------- http://freemusi.cc/
|
|
|
|
Apr 3 2008, 00:32
Post
#2
|
|
![]() Group: Members Posts: 168 Joined: 1-November 06 Member No.: 37040 |
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 |
|
|
|
Apr 3 2008, 10:51
Post
#3
|
|
![]() Group: Members Posts: 881 Joined: 18-June 06 From: Germany Member No.: 31980 |
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 // 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. This post has been edited by ojdo: Sep 15 2008, 15:19 -------------------- http://freemusi.cc/
|
|
|
|
Apr 17 2008, 18:20
Post
#4
|
|
|
Group: Members Posts: 85 Joined: 17-April 06 Member No.: 29659 |
Do you know any good source of high quality artist art? A small jpeg scaled up on a HDTV doesn't look so great.
|
|
|
|
Apr 17 2008, 18:30
Post
#5
|
|
![]() Group: Members Posts: 881 Joined: 18-June 06 From: Germany Member No.: 31980 |
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 -------------------- http://freemusi.cc/
|
|
|
|
Apr 17 2008, 22:41
Post
#6
|
|
![]() Group: Members Posts: 104 Joined: 6-August 06 Member No.: 33734 |
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 $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
|
|
|
|
Apr 17 2008, 22:53
Post
#7
|
|
![]() Group: Members Posts: 881 Joined: 18-June 06 From: Germany Member No.: 31980 |
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 $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 -------------------- http://freemusi.cc/
|
|
|
|
Apr 18 2008, 11:22
Post
#8
|
|
![]() Group: Members Posts: 104 Joined: 6-August 06 Member No.: 33734 |
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
|
|
|
|
Apr 18 2008, 11:25
Post
#9
|
|
![]() Group: Members Posts: 881 Joined: 18-June 06 From: Germany Member No.: 31980 |
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 ... -------------------- http://freemusi.cc/
|
|
|
|
Apr 19 2008, 18:28
Post
#10
|
|
![]() Group: Members Posts: 23 Joined: 5-August 07 From: Poland Member No.: 45930 |
Hi,
nice config's. I have question: would You add playlist dropdown and quicksearch toolbar? thx |
|
|
|
Apr 19 2008, 19:41
Post
#11
|
|
![]() Group: Members Posts: 881 Joined: 18-June 06 From: Germany Member No.: 31980 |
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. -------------------- http://freemusi.cc/
|
|
|
|
Sep 3 2008, 16:36
Post
#12
|
|
|
Group: Members Posts: 2 Joined: 3-September 08 Member No.: 57857 |
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) This post has been edited by Jonasem: Sep 3 2008, 17:10 |
|
|
|
Sep 6 2008, 05:16
Post
#13
|
|
|
Group: Members Posts: 39 Joined: 20-May 06 Member No.: 30990 |
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).
|
|
|
|
Sep 6 2008, 08:17
Post
#14
|
|
![]() Group: Members Posts: 881 Joined: 18-June 06 From: Germany Member No.: 31980 |
I downloaded autohotkey but cant figure out how to do it. Any help? =) This autohotkey code might be a start: CODE #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. -------------------- http://freemusi.cc/
|
|
|
|
Sep 7 2008, 21:57
Post
#15
|
|
|
Group: Members Posts: 2 Joined: 3-September 08 Member No.: 57857 |
I downloaded autohotkey but cant figure out how to do it. Any help? =) This autohotkey code might be a start: CODE #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 =) |
|
|
|
Sep 15 2008, 04:54
Post
#16
|
|
|
Group: Members Posts: 8 Joined: 24-March 08 Member No.: 52263 |
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!
|
|
|
|
Sep 15 2008, 08:24
Post
#17
|
|
![]() Group: Members Posts: 881 Joined: 18-June 06 From: Germany Member No.: 31980 |
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.) -------------------- http://freemusi.cc/
|
|
|
|
Sep 15 2008, 13:55
Post
#18
|
||
|
Group: Members Posts: 8 Joined: 24-March 08 Member No.: 52263 |
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 $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! This post has been edited by scienceguy8m: Sep 15 2008, 14:39 |
|
|
|
||
Sep 15 2008, 16:12
Post
#19
|
|
![]() Group: Members Posts: 881 Joined: 18-June 06 From: Germany Member No.: 31980 |
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... -------------------- http://freemusi.cc/
|
|
|
|
Sep 15 2008, 20:26
Post
#20
|
|
|
Group: Members Posts: 8 Joined: 24-March 08 Member No.: 52263 |
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 // 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). This post has been edited by scienceguy8m: Sep 25 2008, 23:10 |
|
|
|
Sep 15 2008, 21:24
Post
#21
|
|
![]() Group: Members Posts: 881 Joined: 18-June 06 From: Germany Member No.: 31980 |
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 This post has been edited by ojdo: Sep 16 2008, 16:45 -------------------- http://freemusi.cc/
|
|
|
|
Sep 25 2008, 23:12
Post
#22
|
|
|
Group: Members Posts: 8 Joined: 24-March 08 Member No.: 52263 |
That's perfectly fine, I appreciate the credits (though honestly 99% of the credit goes to you!).
This post has been edited by scienceguy8m: Sep 25 2008, 23:12 |
|
|
|
Oct 23 2008, 18:10
Post
#23
|
|
|
Group: Members Posts: 48 Joined: 22-November 06 Member No.: 37910 |
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 |
|
|
|
Oct 23 2008, 19:06
Post
#24
|
|
![]() Group: Members Posts: 881 Joined: 18-June 06 From: Germany Member No.: 31980 |
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 -------------------- http://freemusi.cc/
|
|
|
|
Oct 23 2008, 19:44
Post
#25
|
|
|
Group: Members Posts: 48 Joined: 22-November 06 Member No.: 37910 |
is it true that cwb_hooks is not compatible with the current version of foobar? (0.9.5.6)
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 18th June 2013 - 22:38 |