Home stereo display, For trackinfo mod panel |
This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.
See also: Hydrogenaudio Terms of Service.
![]() ![]() |
Home stereo display, For trackinfo mod panel |
Jan 18 2007, 02:27
Post
#451
|
|
![]() Group: Members Posts: 473 Joined: 4-April 05 From: Chicago, IL Member No.: 21193 |
Okay, you are absolutley right. A Cowboy Junkies FLAC image is reading at 280.8MB but File Info shows 280.31MB. Unfortunately with my limited skills I can't get your change to work. I am trying to replace: CODE $div(%filesize%,1048576)'.'$substr($muldiv(%filesize%,100,1048576),2,2)) (That is later sourced with a "$get(active)MB" string.) Every attempt so far has shut down my display. I'll keep tinkering... Try this out: CODE $div(%filesize%,1048576)'.'$ifgreater($div(%filesize%,1048576),99,$substr($muldiv(%filesize%,1000,1048576),4,5), $ifgreater($div(%filesize%,1048576),9,$substr($muldiv(%filesize%,100,1048576),3,4),$substr($muldiv(%filesize%,100,1048576),2,3)))MB I believe that should give you what you want. If not, let me know. I can't say that I have a FLAC file larger than 100 MB. This post has been edited by kockroach: Jan 18 2007, 02:27 |
|
|
|
Jan 18 2007, 02:51
Post
#452
|
|
|
Group: Members Posts: 16 Joined: 11-January 07 Member No.: 39537 |
Thanks. i don't normally play my FLAC images either. They're for archiving on DVD. Unfortunately my problem is more basic: This is the code that I am working with:
CODE $if(%isplaying%, $div(%filesize%,1048576)'.'$substr($muldiv(%filesize%,100,1048576),2,2)) $alignabs($sub(%_width%,38),$add($div(%_height%,5),19),%_width%,%_height%,,) $font(arial,7,$get(font_options),)$get(active)MB I can't integrate your code into this without turning off my entire display. (Yet anyway... I'll keep trying.) |
|
|
|
Jan 18 2007, 03:25
Post
#453
|
|
![]() Group: Members Posts: 473 Joined: 4-April 05 From: Chicago, IL Member No.: 21193 |
I can't integrate your code into this without turning off my entire display. (Yet anyway... I'll keep trying.) CODE $if(%isplaying%, $div(%filesize%,1048576)'.'$ifgreater($div(%filesize%,1048576),99,$substr($muldiv(%filesize%,1000,1048576),4,5), $ifgreater($div(%filesize%,1048576),9,$substr($muldiv(%filesize%,100,1048576),3,4),$substr($muldiv(%filesize%,100,1048576),2,3)))) $alignabs($sub(%_width%,38),$add($div(%_height%,5),19),%_width%,%_height%,,) $font(arial,7,$get(font_options),)$get(active)MB That should work, except based on what you have, the "MB" is outside of the %isplaying% variable, which means it will always be displayed. It would need to be changed to get it to show only when playing. This post has been edited by kockroach: Jan 18 2007, 03:29 |
|
|
|
Jan 18 2007, 03:56
Post
#454
|
|
|
Group: Members Posts: 16 Joined: 11-January 07 Member No.: 39537 |
That was silly. I was leaving out one ")" which prevented it from working.
I have now tried both your original code that you posted on the last page which was intended for files over 10MB as well as the new one that you kindly fully formatted for me that should deal with files of 100+MB. They both do exactly the same thing: FLAC files from 1-99MB are now accurately rendered which is great. However, even your new code is not working for 100+; it just displays blank (i.e. black) where the number should be. Not a big issue. I'm going to stick with your code. (Like I said, one doesnt actually listen to FLAC images on a regular basis... I'm also going to tinker with it. We must be close) As for the MB always being on, that is intentional. It appears as a greyed out LCD when not in use like many other parts of the display. Thanks! |
|
|
|
Jan 18 2007, 04:31
Post
#455
|
|
![]() Group: Members Posts: 473 Joined: 4-April 05 From: Chicago, IL Member No.: 21193 |
Not sure why it is showing blank on the files over 100MB. Could you post all of your code (use the "codebox" and "/codebox" enclosed in "[]") functions instead so it doesn't crowd the page.
This post has been edited by kockroach: Jan 18 2007, 04:32 |
|
|
|
Jan 18 2007, 05:03
Post
#456
|
|
|
Group: Members Posts: 16 Joined: 11-January 07 Member No.: 39537 |
I found out the problem. There just isn't enough space to show the 100+MB files to 2 decimal places. So it doesn't display. What is working now is to show just one decimal place for 100+MB as follows:
CODE $div(%filesize%,1048576)'.'$ifgreater($div(%filesize%,1048576),99,$substr($muldiv(%filesize%,1000,1048576),4,4), It doesn't seem to average up the second decimal place if greater than 5 but otherwise works perfectly. Is my methodology right? Thanks again! This post has been edited by cooperpwc: Jan 18 2007, 05:04 |
|
|
|
Jan 18 2007, 05:30
Post
#457
|
|
![]() Group: Members Posts: 473 Joined: 4-April 05 From: Chicago, IL Member No.: 21193 |
That was one thing I was going to suggest, changing it to "4,4" so it only shows one decimal. I forgot that the display only shows 1 decimal place, while my Single Column Playlist shows two.
|
|
|
|
Jan 18 2007, 05:37
Post
#458
|
|
|
Group: Members Posts: 16 Joined: 11-January 07 Member No.: 39537 |
That was one thing I was going to suggest, changing it to "4,4" so it only shows one decimal. I forgot that the display only shows 1 decimal place, while my Single Column Playlist shows two. And actually the display looks great now to two decimal places for everything but 100+ which is now one. A successful upgrade and a keeper. |
|
|
|
Jan 29 2007, 05:39
Post
#459
|
|
![]() Group: Members Posts: 20 Joined: 29-January 07 Member No.: 40110 |
I love the Stereo Display trackinfo, but I hated the title not being resizable, and I would see it protruding into other info when I resized foobar or used it on a different resolution. I don't know how important this is, but here is a dynamic answer to the 'window' variable (its the one that chooses how many characters appear at once in the title) replace your normal $puts(window,23) with this :P :
CODE $puts(window,$muldiv($sub(%_width%,551),100,1018))
|
|
|
|
Feb 18 2007, 10:24
Post
#460
|
|
|
Group: Members Posts: 4 Joined: 18-February 07 Member No.: 40718 |
Has anyone tried simply adding the line: CODE // PerSecond To the top of the code? Exactly. Actually you just need to place each section of the code in one of the following four, (cf. Wiki Help) : // Globals // Background // PerTrack // PerSecond It worked perfectly for me. Thanks for the code, it's great ! |
|
|
|
Feb 20 2007, 18:50
Post
#461
|
|
|
Group: Members Posts: 2 Joined: 25-August 06 Member No.: 34440 |
QUOTE Exactly. Actually you just need to place each section of the code in one of the following four, (cf. Wiki Help) : // Globals // Background // PerTrack // PerSecond Could you please elaborate on this? Or give an example? This post has been edited by ashepler: Feb 20 2007, 18:50 |
|
|
|
Feb 21 2007, 16:01
Post
#462
|
|
|
Group: Members Posts: 4 Joined: 18-February 07 Member No.: 40718 |
Unfortunately I'm not a good coder, but you can check example below. It's working with my config.
In // Globals, general variables In // Background, the images In // PerTrack, the trackinfo itself In // PerSecond, the time display Knowing that you can add the other functions of the code in each section, depending on its refreshing frequency. CODE // Globals
$puts(write_tags,) $puts(removable,FGH) $puts(glass_intensity,5) $puts(back,$rgb(100,100,100)) $puts(active,$rgb(250,250,250)) $puts(alt_font_fix,-2) // Background $imageabs(-6,-25,images\FOOBOTTOM2.png,) $imageabs(1,2,images\template1.png,) // PerTrack ////////////////////////////////////////Track info/////////////////////////////////////////////// $alignabs(21,72,%_width%,%_height%,,) $puts(title,['"'%title%'"'][ - %artist%]['/'%album%] ['('%date%')']) $if($strchr($ascii($replace($get(title),?,@)),?), $alignabs(21,$add(72,$get(alt_font_fix)),%_width%,%_height%,,) $font(courier new,9,italic,250-250-250), $puts(title, $lower($replace($upper($get(title)),-,$char(8208),&,and,À,a,Á,a,Â,a,Ã,a,Ä,ae,Å,a, Æ,ae,Ç,c,È,e,É,e,Ê,e,Ë,e,Ì,i,Í,i,Î,i,Ï,i,Ò,o,Ó,o,Ô,o,Õ,o,Ö,oe,Ù,u,Ú,u,Û,u,Ü,ue, ß,ss))) $puts(alt_font_fix,0)$font(lcdmono2,10,bold,250-250-250))$get(active) $if($greater($len($get(title)),57), $if($stricmp($mod($len($get(title)),2),1), $puts(title,$pad($get(title),$add($len($get(title)),1))),) $puts(shift,$sub($len($get(title)),57)) $puts(mod,$mod(%_time_elapsed_seconds%,$add($mul($get(shift),2),2))) $if($greater(3,$get(mod)),$substr($get(title),1,57), $puts(mod,$sub($get(mod),2))$puts(flag,$get(mod)) $if($greater($add($get(shift),1),$get(mod)), $substr($get(title),$add(1,$get(mod)),$add(57,$get(mod))), $substr($get(title),$sub($mul($get(shift),2),$get(mod),-1), $add(57,$sub($mul($get(shift),2),$get(mod),0))))), $alignabs(17,$add(72,$get(alt_font_fix)),404,%_height%,center,top) $get(active)$get(title))$font(arial,8,,250-250-250) $alignabs(425,70,%_width%,%_height%,,) $if($greater($get(flag),0),$get(active),$get(back))$char(9668)$char(32) $if($or($greater($get(shift),$get(mod)),$greater($get(mod),$get(shift))), $get(active),$get(back))$char(9658) // PerSecond ///////////////////////////////////////////Time Sequence/////////////////////////////////////////// $font(7 Segment,24,,)$alignabs(93,17,%_width%,%_height%,,)$get(back) $char(56)$char(56):$char(56)$char(56) $alignabs(93,17,%_width%,%_height%,,)$get(active) $num($div(%playback_time_seconds%,60),2):$num($mod( %playback_time_seconds%,60),2) ////////////////////////////////Play pause tracknumber////////////////////////////////////////// $alignabs(193,34,%_width%,%_height%,,) $font(webdings,10,,250-250-250) $if(%ispaused%,$get(active),$get(back))$char(59)$font(arial,9,,) $if($not(%ispaused%),$get(active),$get(back))$char(9658) $alignabs(20,17,%_width%,%_height%,,)$font(7 Segment,24,,) $get(back)$char(56)$char(56) $alignabs(20,17,%_width%,%_height%,,) $get(active)$substr([%tracknumber%],1,2) |
|
|
|
Jul 1 2008, 01:41
Post
#463
|
|
|
Group: Members Posts: 8 Joined: 15-September 06 Member No.: 35187 |
is anyone still using this? it seems to be perfectly compatible with the newest version of foobar even though foo_cwb_hooks is broken.
Here's a pic of mine: My Foobar |
|
|
|
Jul 1 2008, 02:03
Post
#464
|
|
![]() Group: Members Posts: 311 Joined: 30-May 08 Member No.: 53920 |
I haven't tried it, yet this home stereo display looks pretty nice.
|
|
|
|
Mar 8 2009, 17:24
Post
#465
|
|
|
Group: Members Posts: 6 Joined: 8-February 09 Member No.: 66766 |
Where could I download the Home Stereo Display and the Home Stereo Display SDK? The links of the first post are all broken :/
|
|
|
|
Jan 15 2010, 11:02
Post
#466
|
|
|
Group: Members Posts: 25 Joined: 20-March 06 Member No.: 28615 |
Sorry to be kicking this old topic, but....
I've been using your 'Home Stereo' design for quite some time now. Now I want to upgrade my foobar version from 0.9.5.1 to a newer version (installed as portable), everything seems to be working except some functionality in the 'Home Stereo'. The playing time is not updated for one. After some searching I found that it depends heavily on foo_cwb_hooks, which is no longer being updated. Do you know some way to get the 'Home Stereo' working again (or is there a similar layout that works fine with a newer version of Foobar)?? |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd May 2013 - 18:51 |