Moode Audio Player for Raspberry Pi

Does Moode have the capability of automatically switching between different audio renderers when they receive data/audio? I want to be able to use Airplay from my phone to start music in Moode, but i also have homeassistant that can send TTS to speakers (via airplay or MPD or any other source). What im seeing is that if i start with airplay but then there is a TTS announcement that is pushed to Moode, it just stops the airplay audio but the annoucnement doesnt happen. I'd love to figure this out. This happens for me in picoreplayer as well. Might just be a limitation of these OSes. TIA.
 
Thanks @TimCurtis. Yeah i've tested the session interruption (allow_session_interruption) and i think thats how i got to the point where it stops audio, but for some reason it doesnt completely kill the session or something until i actively disconnect from the speaker on my phone.

Digging through shairport docs and this looks interesting:
* Session Timeout and Allow Session Interruption can now be set independently. This is really some "housekeeping" as referred to above -- it's a kind of a bug fix, where the bug in question is an inappropriate connection of the setting of two parameters. To explain: (1) By default, when a source such as iTunes starts playing to the Shairport Sync device, any other source attempting to start a play session receives a "busy" signal. If a source disappears without warning, Shairport Sync will wait for 120 seconds before dropping the session and allowing another source to start a play session. (2) The command-line option -t or --timeout allows you to set the wait time before dropping the session. If you set this parameter to 0, Shairport Sync will not send a "busy" signal, thus allowing another source to interrupt an existing one. (3) The problem is that if you set the parameter to 0, a session will never be dropped if the source disappears without warning.
The (obvious) fix for this is to separate the setting of the two parameters, and this is now done in the configuration file /etc/shairport-sync.conf -- please see the settings allow_session_interruption and session_timeout. The behaviour of the -t and --timeout command-line options is unchanged but deprecated.

I set the session_timeout to 1 but i might try and set it to 0 and see if it just kicks the other source off.
 
Connecting via VPN to a home LAN based music server is kind of a niche usage scenario, at least for our project.

In any case heres some info

Moode can apply CamillaDSP to output from MPD, Bluetooth (inbound), AirPlay, Spotify Connect, Deezer Connect and Squeezelite before sending the final processed ALSA stream to the locally attached audio device.

CamillaDSP is not applied to Bluetooth (outbound) i.e. moode outputting to a remote Bluetooth speaker because we don't run CamillaDSP as standalone service, which is required for its bluez-alsa backend that would enable this capability.

We output to the alsa_cdsp I-O plugin which starts/stops CamillaDSP and handles automatic sample rate and bit depth switching. https://github.com/scripple/alsa_cdsp

For remote Browser playback, moode supports the MPD HTTP server which is an internal MPD plugin and functions like a basic Icecast server on default port 8000 using MP3 320K format. AFAIK DSP can't be applied to this output.
Thanks for the reply. Roon will soon have a new input feature called Roon Relay which allows you to feed any source (digital or a analogue) into Roon.

I can play Roon in my car at the moment so it seems Roon Relay will fit my needs. Expensive but the UI is nice and ability to do room correction in the car for any source, is a game changer (for me).

Assumption is one is starting with a decent and full-range sound system to begin with (just like at home)
 
Hi,

moOde 9.2.3 is available in the Media Player OS section of the Raspberry Pi Imager or as a direct download at https://moodeaudio.org. Visit the Forum for more information https://moodeaudio.org/forum/showthread.php?tid=7297&pid=60672#pid60672

moode-r900-logotype-bg.png
 
Hi, thanks for the great software!

I'm running Moode on a Raspberry Pi Zero 2 W connected to an S.M.S.L M200 DAC via USB.

For the past couple of months, I've had an annoying problem: Moode sometimes automatically switches the output device from "SMSL USB Audio" to "Pi HDMI 1".

This means that every few times I start my system, I have to manually change the output back to USB.

What can I do to prevent this from happening?

Thanks
 
How about a remote for a Pi installation... GUI is nice but when your playlist is set and ready, the "usual" sit-and-listen management is a bit tiresome to do via a phone/pad/computer - one just wants a quick volume adjustment or play next song - it would be so much convenient to use a small remote with the few crucial command on...

Is there a way to have a simple / few keys IR remote and a hooked up IR receiver to the Pi in order to reach both player and CDSP functions? Like Pause, Play, Volume (CDSP), Mute, Change CDSP config?

//
 
Sure, you can do some sort of IR or wireless remote. There are a number of threads about various remotes in the FAQ/Guides section of our Forum but I don't have any personal experience with any of the approaches. Personally I just use my Smartphone on a small angle stand. Its just one or two taps to do the basics.

In any case here is some additional info:

moOde comes with the triggerhappy daemon and a default config file for something like a typical USB volume knob.

Code:
Triggerhappy is a hotkey daemon that operates on a system wide scale. It watches all
configured input devices for key, switch or button events and can launch arbitrary
commands specified by the administrator. In contrast to hotkey services provided by
desktop environments, Triggerhappy is especially suited to hardware related switches like
volume or wifi control; it works independently from a specific user being logged in and is
also suitable for embedded systems that do not a graphical user interface.

# /etc/triggerhappy/triggers.d/media.conf
Code:
KEY_VOLUMEUP     1 /var/www/util/vol.sh -up 1
KEY_VOLUMEDOWN   1 /var/www/util/vol.sh -dn 1
KEY_MUTE         1 /var/www/util/vol.sh -mute

# Monitor events
Code:
pi@moode9:~ $ thd --dump /dev/input/event*
EV_KEY  KEY_VOLUMEUP    1       /dev/input/event7
# KEY_VOLUMEUP  1       command
EV_KEY  KEY_VOLUMEUP    0       /dev/input/event7
# KEY_VOLUMEUP  0       command

EV_KEY  KEY_MUTE        1       /dev/input/event7
# KEY_MUTE      1       command
EV_KEY  KEY_MUTE        0       /dev/input/event7
# KEY_MUTE      0       command

EV_KEY  KEY_VOLUMEDOWN  1       /dev/input/event7
# KEY_VOLUMEDOWN        1       command
EV_KEY  KEY_VOLUMEDOWN  0       /dev/input/event7
# KEY_VOLUMEDOWN        0       command

Maybe something like the wireless remote below would work with triggerhappy?
https://www.amazon.com/Seleven-Univ...prefix=raspberry+pi+usb+remote,aps,115&sr=8-2
 
  • Like
Reactions: TNT
little surprise this morning with the latest version of moode I listened to music in bluetooth I disconnected it and I found myself with an error "open mpd sock failed" and no more access to the menu everything crashed.

moodeutl -l

20250306 092316 worker: -- MPD startup
20250306 092316 worker: --
20250306 092318 worker: MPD service: started
20250306 092321 worker: MPD port 6600: connection refused

even after restarting the pi it's the same
 
Last edited: