Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


How to attach MOCP player, instead of MPD?
#1
Hi guys,

I tried few systems like Volumio, Rune, MoOde (best one, for sure) – and then compared music... being played by MOCP.

I would like to know – is there any chance to teach MoOde to send commands (play/stop/pause/forward/back – enough) and file path to the MOCP? 

Sadly, this one sounds much much better than MPD, sonically. But the UI......

Many thanks!

P.S. I use external USB (Amanero) DAC.
Reply
#2
If you turn on the metadata file in System config it will be updated after at most 3 seconds whenever current song metadata, volume, play state etc changes.

Example contents:
Code:
pi@rp3:~ $ cat /var/local/www/currentsong.txt
file=http://aac-64.streamthejazzgroove.com:80/stream
artist=Radio station
album=The Jazz Groove
title=Antonio Carlos Jobim - O Morro Nao Tem Vez
coverurl=images/radio-logos/The Jazz Groove.jpg
track=
date=
composer=
encoded=VBR
bitrate=59 kbps
outrate=16 bit, 44.1 kHz, Stereo, 1.411 mbps
volume=20
mute=0
state=play

You could also turn on the LCD updater engine and enter the path to a user-written script that parses currentsong.txt and does things based on the contents. The script doesn't have to update an LCD, it could for example send commands to another program.

The advantage of using the LCD updater engine to fire the script rather than having a stand-alone script with its own polling loop for detecting changes in currentsong.txt is that the LCD updater uses a very efficient inotifywait event mechanism and thus no polling loop :-) It only fires the script when currentsong.txt has been changed.

If you turn it on and don't specify a script it will by default create and update a file named /home/pi/lcd.txt

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Wow, thank you Tim, brilliant idea! I see it's working great, I see my tracks there!

So I can play MPD to nowhere (if it is possible), or to Pi's analogue out which I don't use, while MOC Player will proceed to my USB DAC.

The only thing is.. how to get MOC peaking the file path... Here my almost zero knowledge of Linux ends... :-(


P.S. The script doesn't clear up upon STOP command? So, MOC will be play forever... well, "you wanted it – you got it" Smile
Reply
#4
Yes, just configure MPD to use the on-board audio device (Pi analog out)

What do these items refer to?
- "peaking the file path"
- "The script doesn't clear up upon STOP command"
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
(10-04-2018, 08:46 PM)Tim Curtis Wrote: Yes, just configure MPD to use the on-board audio device (Pi analog out)

What do these items refer to?
- "peaking the file path"
- "The script doesn't clear up upon STOP command"

Sorry, got the last line in the script, this reflects play/pause. All good, now looking to adjust MOCP somehow, to get it dependant on the script...
Reply


Forum Jump: