karlstav / cava

Cross-platform Audio Visualizer
MIT License
3.92k stars 225 forks source link

Two squares (not umlaut) on top of each bar if starting over ssh #553

Open bdmillan opened 3 months ago

bdmillan commented 3 months ago

Hi all, I run cava on a raspberry pi 1B with a small hdmi screen. Works well using noncurses. However, to avoid keeping a keyboard attached, I ssh from my PC using PuTTY. To start cava, I simply type on the computer connected via ssh: cava > /dev/tty1

When I invoke cava in this fashion, each of the bars has an umlaut as in: Ä, but without the A. Connecting a keyboard to the pi and invoking normally cava, the umlaut doesn't appear.. Not a big deal really, but they are a bit distracting. They remind me of "peak" markers except they drop instantly with the bar. Sorry for the long post. Any thoughts? Thank you.

karlstav commented 3 months ago

does it work better when launching as described in the readme?

if not, then there is most likely some locale issue.

bdmillan commented 3 months ago

I shall check later today. Thanks for the tip.

​Brian ​Millan


From: karl @.> Sent: Wednesday, March 13, 2024 1:21 PM To: karlstav/cava @.> Cc: Brian @.>; Author @.> Subject: Re: [karlstav/cava] Umlaut on top of each bar if starting over ssh (Issue #553)

does it work better when launching as described in the readmehttps://github.com/karlstav/cava?tab=readme-ov-file#running-via-ssh?

if not, then there is most likely some locale issue.

— Reply to this email directly, view it on GitHubhttps://github.com/karlstav/cava/issues/553#issuecomment-1995068435, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJPGYU7MEQWGZAXCYF336G3YYCDLBAVCNFSM6AAAAABEOKSANCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJVGA3DQNBTGU. You are receiving this because you authored the thread.Message ID: @.***>

bdmillan commented 3 months ago

Sorry for the delay. When I run the command suggested in the README via ssh to the RPi, this happens: root@raspi1:~# cava <> /dev/console >&0 2>&1 Segmentation fault

and on the RPi console screen appears this: PXL_20240329_145014269 This is somewhat similar to error reported in #555.

When I run cava > /dev/tty1 via ssh, closer inspection reveals that the "umlaut" appears to be two small squares side by side. Interestingly, one of the bars doesn't have the squares. They appear to be there on all bars when watching dynamically. Must have caught one as it was changing direction. PXL_20240329_151801154(1)

Cava works fine with alsa noncurses when run from a usb keyboard.

By default, Raspberry Pi OS has the UK locale. I changed it to US when I installed. Tried putting it back to UK, but it made no difference. Honestly this is no problem for me. I just keep a small keyboard available for the unit. Feel free to close, I just didn't want to leave the thread hanging.

karlstav commented 3 months ago

the issue is related to the 1/8 - 7/8 block characters drawn on top of the bars to increase the resolution. when in a software terminal cava uses unicode box drawing characters. But in a tty it uses a custom font where some characters are swapped with the block characters. The problem here is that cava is unaware that it is running in a tty. You need to do something like this:

cava <> /dev/tty1 >&0 2>&1