PeppySpectrum with MoOde - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: PeppySpectrum with MoOde (/showthread.php?tid=5149) |
PeppySpectrum with MoOde - franktw956 - 10-27-2022 Hi, I'd like to share my learning, and looking for help. 0. System MoOde 8.2.2 Rpi 4 IQAudio DAC PRO 1920*550 LCD panel 1. MoOde Configuration Settings Audio --> ALSA Options --> Output mode --> Default (plughw) Audio --> ALSA Options --> Loopback --> ON 2. Edit _sndaloop.conf sudo nano /etc/alsa/conf.d/_sndaloop.conf pcm.!_audioout { type plug slave.pcm { type multi slaves { a { channels 2 pcm "plughw:0,0" } b { channels 2 pcm "alsa_peppy" } } bindings { 0 { slave a channel 0 } 1 { slave a channel 1 } 2 { slave b channel 0 } 3 { slave b channel 1 } } } ttable [ [ 1 0 1 0 ] # left -> a.left, b.left [ 0 1 0 1 ] # right -> a.right, b.right ] } pcm.alsa_peppy { type meter slave.pcm "hw:Loopback,1,0" scopes.0 peppyalsa } pcm_scope.peppyalsa { type peppyalsa decay_ms 400 meter "/var/tmp/myfifo" meter_max 100 meter_show 0 spectrum "/var/tmp/myfifosa" spectrum_max 100 spectrum_size 30 } pcm_scope_type.peppyalsa { lib /usr/local/lib/libpeppyalsa.so } 3. Install peppyalsa https://github.com/project-owner/peppyalsa.doc/wiki/Installation 4. Please reboot system 5. Get PeppySpectrum git clone https://github.com/project-owner/PeppySpectrum.git 6. Configure PeppySpectrum sudo nano /home/pi/PeppySpectrum/config.txt [current] spectrum = screen.size = large screen.width = 800 screen.height = 480 update.period = 10 max.value = 100 pipe.name = /var/tmp/myfifosa size = 30 update.ui.interval = 0.033 frame.rate = 30 depth = 32 exit.on.touch = True stop.display.on.touch = False use.logging = False use.test.data = [sdl.env] framebuffer.device = /dev/fb1 mouse.device = /dev/input/touchscreen mouse.driver = TSLIB mouse.enabled = True video.driver = dummy video.display = :0 double.buffer = True no.frame = True 7. Run PeppySpectrum cd /home/pi/PeppySpectrum && export DISPLAY=:0 && python3 spectrum.py 8. Demo video clip https://youtu.be/2xXw7OspsEw 9. help needed i. currently I'm using the mpc status to start/stop PeppySpectrum, this is ok for Radio / File / UPNP, but not working for BlueTooth / Spotify / Airplay, may I know how to detect BlueTooth / Spotify / Airplay is activating ? ii. I've tried to use a transparent picture (png format) for the PeppySpectrum's background, but it is still black overlay the original MoOde display items, so now I set Pure Black as the Preferences without Cover backdrop, then the screen looks a bit clean, but I love Cover backdrop and hope the PeppySpectrum's background picture can be really transparency, so that screen will be wonderful, may I know is it possible ? and how ? Thank you. RE: PeppySpectrum with MoOde - Tim Curtis - 10-27-2022 Open System config and turn on the Metadata file then use the commands below to see whats active and whether it's playing. The Metadata file gets updated within 3 seconds of any changes in playback state. Code: pi@moode:~ $ grep "file" /var/local/www/currentsong.txt | cut -d "=" -f 2 What viewport size does that screen report? Use the command below to display the viewport size in a popup notification when Menu, Refresh. Code: # Display viewport size in popup notification RE: PeppySpectrum with MoOde - franktw956 - 10-27-2022 (10-27-2022, 12:13 PM)Tim Curtis Wrote: Open System config and turn on the Metadata file then use the commands below to see whats active and whether it's playing. The Metadata file gets updated within 3 seconds of any changes in playback state. Thank you, Tim, I will try out the grep later. The viewport size is 1919x549, so I made some changes in moode.css /* Ultrawide 1920 x 550 panel (viewport 1919x549) */ @media (min-height:549px) and (width:1919px) { img.coverart {width:78vh;} .playqueue .pll1 {font-size:2rem;} .playqueue .pll2 {font-size:1.5rem;margin-left:calc(3em + 1vmin)!important} #volcontrol, #countdown {height:8vw;width:8vw;padding-bottom:1px;} } RE: PeppySpectrum with MoOde - Tim Curtis - 10-27-2022 Ok, the CSS mods explain why the UI isn't so heavily clipped but it's still not ideal. There are prolly a few things that can be done to address that. There is one more release planned for the end of the year and its mainly focussed on fixing any bugs that are reported and can be reproduced, and a refactoring the CSS and Config screen HTML. As long as I'm going to be into the CSS I can include your media query for that screen. If you have other changes let me know because it appears that these Ultrawide's are pretty popular. RE: PeppySpectrum with MoOde - Nutul - 10-27-2022 (10-27-2022, 01:18 PM)franktw956 Wrote: (...) .playqueue .pll2 {font-size:1.5rem;margin-left:calc(3em + 1vmin)!important}<rant> Maybe I am old-school, but if there that one thing I do hate, it's the "!important" CSS thing. </rant> Cheers, Al. RE: PeppySpectrum with MoOde - Tim Curtis - 10-27-2022 (10-27-2022, 02:33 PM)Nutul Wrote:(10-27-2022, 01:18 PM)franktw956 Wrote: (...) .playqueue .pll2 {font-size:1.5rem;margin-left:calc(3em + 1vmin)!important}<rant> It's a necessary evil in the current CSS. I'm refactoring it so it will be easier to maintain but I'm not making any attempt to rewrite it. RE: PeppySpectrum with MoOde - Tim Curtis - 10-27-2022 Playback view on these Ultrawide's could look something like below to avoid clipping and out of proportion controls. The popup volume control is used instead of the knob. Long song titles as are common in Classical would prolly need to be ellipsis limited instead of wrapping otherwise the metadata under the cover clips at the bottom. Playback view [attachment=3034] CoverView + Playbar [attachment=3035] RE: PeppySpectrum with MoOde - franktw956 - 10-28-2022 (10-27-2022, 03:29 PM)Tim Curtis Wrote: Playback view on these Ultrawide's could look something like below to avoid clipping and out of proportion controls. The popup volume control is used instead of the knob. Long song titles as are common in Classical would prolly need to be ellipsis limited instead of wrapping otherwise the metadata under the cover clips at the bottom. Your new layout is better, I just follow it, but I don't know how/where to modify the bottom manu to add popup volume control. Looking forward for your new layout release, thanks ! RE: PeppySpectrum with MoOde - franktw956 - 10-28-2022 Tim CurtisOpen System config and turn on the Metadata file then use the commands below to see whats active and whether it's playing. The Metadata file gets updated within 3 seconds of any changes in playback state. Code: pi@moode:~ $ grep "file" /var/local/www/currentsong.txt | cut -d "=" -f 2 Thank you, Tim, the grep command helps. I got it working, different triggers ~ ~ Radio / File / UPNP --> PeppySpectrum ~ Spotify / Airplay --> PeppyMeter https://youtu.be/eM6GONoWZFc Not working (but fine with me) ~ ~ Bluetooth Hopefully the albumart can be shown with PeppyMeter in the future. Thanks again ! RE: PeppySpectrum with MoOde - Tim Curtis - 10-28-2022 For a Bluetooth connection the currentsong file won't be updated until bluez-alsa starts playing something. I suppose I should look at also updating the file initially when Bluetooth connects. Another way to tell if one of the renderers is active is to query the active flags. rbactive aplactive btactive slactive spotactive inpactive rxactive # Dump the session var sudo moodeutl -d | grep btactive | cut -d "|" -f 2 # Query the table moodeutl -q "select value from cfg_system where param='btactive'" |