Help - Search - Members - Calendar
Full Version: Home stereo display
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
kockroach
QUOTE(cooperpwc @ Jan 17 2007, 19:13) *

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.
cooperpwc
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.)
kockroach
QUOTE(cooperpwc @ Jan 17 2007, 19:51) *

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.
cooperpwc
That was silly. I was leaving out one ")" which prevented it from working. rolleyes.gif
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!
kockroach
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.
cooperpwc
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!
kockroach
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.
cooperpwc
QUOTE(kockroach @ Jan 17 2007, 22:30) *

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.
BGonz808
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))
LeBakalite
QUOTE(Yotsuya @ Jan 13 2007, 16:14) *

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 !
ashepler
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?
LeBakalite
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)
BiNiaRiS
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
Sounds Blast
I haven't tried it, yet this home stereo display looks pretty nice.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.