hankhank10 / music-screen-api

Display the playing Sonos track in real time on an e-ink display - also includes functionality for last.fm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for rectangle HyperPixel display

jjlawren opened this issue · comments

@rdrivas123 I have an idea of how to make this work on both HyperPixel screen dimensions but haven't had time to play with it as of yet. It might just work for now by adjusting these values:

SCREEN_W = 720
SCREEN_H = 720
THUMB_W = 600
THUMB_H = 600

Got the album art to adjust to the screen, there is a gray bar at the bottom when i use outside the standard parameters, not a big deal. One thing I did notice when the track title pops up is that it scales the image back outside the 480 width of the rectangle screen, Not sure if there is a way to adjust the text size down?

Everything else is working perfectly.

Originally posted by @rdrivas123 in #24 (comment)

SCREEN_W = 480
SCREEN_H = 720
THUMB_W = 600
THUMB_H = 600

@rdrivas123 The above doesn't fit the screen size of the rectangular HyperPixel 4.0. If you're running in a vertical orientation, try these values:

SCREEN_W = 480
SCREEN_H = 800
THUMB_W = 480
THUMB_H = 480

It seems to roughly work but there might need some adjustments to the text in terms of placement, wrap width, etc.

SCREEN_W = 480
SCREEN_H = 720
THUMB_W = 600
THUMB_H = 600

@rdrivas123 The above doesn't fit the screen size of the rectangular HyperPixel 4.0. If you're running in a vertical orientation, try these values:

SCREEN_W = 480
SCREEN_H = 800
THUMB_W = 480
THUMB_H = 480

It seems to roughly work but there might need some adjustments to the text in terms of placement, wrap width, etc.

Made that adjustment looks good so far! Thanks!

commented

Pulled new dev branch and looks pretty good to me!

SCREEN_W = 800
SCREEN_H = 480
THUMB_W = 350
THUMB_H = 350

and

if show_artist_and_album:
    track_font = tkFont.Font(family="Helvetica", size=25)
else:
    track_font = tkFont.Font(family="Helvetica", size=20)
detail_font = tkFont.Font(family="Helvetica", size=15)

image

Pulled new dev branch and looks pretty good to me!

SCREEN_W = 800
SCREEN_H = 480
THUMB_W = 350
THUMB_H = 350

and

if show_artist_and_album:
    track_font = tkFont.Font(family="Helvetica", size=25)
else:
    track_font = tkFont.Font(family="Helvetica", size=20)
detail_font = tkFont.Font(family="Helvetica", size=15)

image

Hi Craigusus

I have followed Mark Hank tutorial , and it´s working quitine fine , but is uses the rectangular hyperpixel screen ..and i wanted to use the adjustments values you uses too ..

I am stuck with my Pi because i cant get out of the Album art showing on the screen ..

How do you insert this new size value in the pi ?

Thanks for your help

Best regards

commented

Hi @vietscong

The only files I edited were display_controller.py lines 13 - 16
from:

SCREEN_W = 720
SCREEN_H = 720
THUMB_W = 600
THUMB_H = 600

to

SCREEN_W = 800
SCREEN_H = 480
THUMB_W = 350
THUMB_H = 350

Lines 76 - 80
from:

if show_artist_and_album:
    track_font = tkFont.Font(family="Helvetica", size=30)
else:
    track_font = tkFont.Font(family="Helvetica", size=40)
detail_font = tkFont.Font(family="Helvetica", size=15)

to:

if show_artist_and_album:
    track_font = tkFont.Font(family="Helvetica", size=25)
else:
    track_font = tkFont.Font(family="Helvetica", size=20)
detail_font = tkFont.Font(family="Helvetica", size=15)

And sonos_settings.py (copy of my file below).
https://pastebin.com/nA5TyhRh

Please bear in mind I have my screen running on a separate Pi. So your value on line 6 of sonos_settings.py will probably still be:

sonos_http_api_address = "localhost"

I hope this helps.