Skip to main content

Topic: Home stereo display (Read 203319 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • kockroach
  • [*][*][*][*]
Home stereo display
Reply #450
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: [Select]
$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: [Select]
$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.
  • Last Edit: 17 January, 2007, 08:27:44 PM by kockroach

  • cooperpwc
  • [*]
Home stereo display
Reply #451
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: [Select]
$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
  • [*][*][*][*]
Home stereo display
Reply #452
I can't integrate your code into this without turning off my entire display. (Yet anyway... I'll keep trying.)

Code: [Select]
$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.
  • Last Edit: 17 January, 2007, 09:29:58 PM by kockroach

  • cooperpwc
  • [*]
Home stereo display
Reply #453
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!

  • kockroach
  • [*][*][*][*]
Home stereo display
Reply #454
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.
  • Last Edit: 17 January, 2007, 10:32:30 PM by kockroach

  • cooperpwc
  • [*]
Home stereo display
Reply #455
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: [Select]
$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!
  • Last Edit: 17 January, 2007, 11:04:13 PM by cooperpwc

  • kockroach
  • [*][*][*][*]
Home stereo display
Reply #456
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
  • [*]
Home stereo display
Reply #457
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
  • [*]
Home stereo display
Reply #458
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: [Select]
$puts(window,$muldiv($sub(%_width%,551),100,1018))

  • LeBakalite
  • [*]
Home stereo display
Reply #459
Has anyone tried simply adding the line:
Code: [Select]
// 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
  • [*]
Home stereo display
Reply #460
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?
  • Last Edit: 20 February, 2007, 12:50:37 PM by ashepler

  • LeBakalite
  • [*]
Home stereo display
Reply #461
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: [Select]
// 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
  • [*]
Home stereo display
Reply #462
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

Home stereo display
Reply #463
I haven't tried it, yet this home stereo display looks pretty nice.

Home stereo display
Reply #464
Where could I download the Home Stereo Display and the Home Stereo Display SDK? The links of the first post are all broken :/

  • Mr. Happy
  • [*]
Home stereo display
Reply #465
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)??