Moode Audio Player for Raspberry Pi

Hi, check it out.
 

Attachments

  • moode-r37-wwoz.png
    moode-r37-wwoz.png
    190.2 KB · Views: 264
Hi,

Moode mounts NAS devices during startup and assumes the NAS device is online.

There are a couple of approaches to handling the "NAS offline" scenario.

1) Add a "Remount" button to Sources screen. This simply tries remounting the NAS sources without doing MPD update.
2) Add a "check and remount" section to Worker polling loop. This would automatically try remounting NAS sources if they are not already mounted.

Either of these could work but "NAS offline" does not seem like a common usage scenario. If it is then happy to investigate the above.

-Tim

Thanks. How about adding that functionality to the "Refresh" menu item which is already existing?




Hi,

If Foobar supports Airplay then turn on Airplay receiver in Moode. Airplay integration in Moode has some nice options including:

- Resume MPD after Airplay session ends
- Metadata and cover art display
- Hardware volume
- Multi-room sync audio

Metadata and multi-room sync audio assume the Airplay sender supports these features.

-Tim

I could not figure out if Foobar supports Airplay.
So, after searching around a bit I found clear instructions here
Optimizing your network player or amplifier by using Foobar | Son-Vidéo.com: blog

All we need is the UPnP MediaRenderer Output component to be installed.

Then in MoOde, I turned on Airplay, UPnP and DLNA - all of them, though I think I have no use of Airplay and DLNA perhaps.

Foobar was able to redirect the sound to MoOde.
 
I have suffered with this, my library sits on a mac server and i found that implementing NFS services worked much better than Samba based file shares.

Chris

I have done some digging around. WD Mybooklive does not support NFS. Some people have tried to get it working but I cannot see any reports which describe it as an easy option.
So, I am back with SMB/ CIFS.

The problem is that the NAS takes a few minutes to boot up and be available.
MoOde on the other hand boots up in less than 30 seconds, I think.
So, I always land up with the situation that NAS is not ready.
 
my pi2 gone dead while playing songs overnight.
any idea how i can diagnose?
source: USB connected HDD, as DLNA server, controlled from Win DMC.
moode 3.6, using Advanced-RT, on demand, FIFO setting

/var/log/mpd/mpd.log here
May 13 19:09 : exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
May 13 19:09 : avahi: Service 'moode' successfully established.
May 13 19:09 : player: played "http://192.168.0.8:8200/MediaItems/14011.flac"
May 13 19:23 : exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted



SSH can't connect to RPI, web UI won't as well
 
Last edited:
Hi,

Switch to the Standard Linux kernel and try the USB (UAC2) work around on System config. The usb audio driver in Linux kernel has bugs that affect certain high speed USB chipsets.

-Tim

Thank you, still does not work. All files are on a NAS and streamed via wired LAN.
I can only get flac 16/44.1 to work corectly. 24/96 give me rhythmic click (pop) noise and my ears hurt from ultrasonic noises DSD, mp3 radio streams have a white noise overlay over the music.

Also, accessing moode via chrome on android, in the library tab, the first column is "Albums", i have around 1,500 albums, normal usage scenario is that first column should be Album Artist and Albums after. Is there a way to change this? Also, couldn't care less about the genre, tab, can i remove it and replace it with something useful?
Last , but not least, can i enable tiled view for artists and albums?
 
I have done some digging around. WD Mybooklive does not support NFS. Some people have tried to get it working but I cannot see any reports which describe it as an easy option.
So, I am back with SMB/ CIFS.

The problem is that the NAS takes a few minutes to boot up and be available.
MoOde on the other hand boots up in less than 30 seconds, I think.
So, I always land up with the situation that NAS is not ready.

The nature of a NAS is that it stays on for when network users require it.

Turn your NAS on first.

Mine is on 24/7. If I just wanted casual storage, I would have used a portable disk.
 
Hi Stu,

I've got one of the old hifiberry boards somewhere so I could test it if need be but I think what you may be experiencing is the change in how logarithmic volume is being handled in new MPD 0.20 series.

Beginning with MPD 0.20.1, logarithmic volume curve for Hardware volume is handled by MPD thus eliminating the need for Moode code to do this as was done in Moode 2.0 - 3.1 releases. MPD 0.20 series may also have changed the log curve for Software volume. Id have to look at MPD sources.

The audio quality should not be affected.

-Tim

I can confer with this. Volume knob behaviour did change with 3.5/3.6 but sound quality has most certainly not suffered and once you get used to it I prefer the way it works now
 
my pi2 gone dead while playing songs overnight.
any idea how i can diagnose?
source: USB connected HDD, as DLNA server, controlled from Win DMC.
moode 3.6, using Advanced-RT, on demand, FIFO setting

/var/log/mpd/mpd.log here
May 13 19:09 : exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
May 13 19:09 : avahi: Service 'moode' successfully established.
May 13 19:09 : player: played "http://192.168.0.8:8200/MediaItems/14011.flac"
May 13 19:23 : exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted



SSH can't connect to RPI, web UI won't as well

Hi,

The RT kernel is experimental so no guarantee of stability. If you are mostly using Moode as a DLNA server then I'd recommend running the Standard kernel.

The OutputThread error that appears in MPD log is fixed in next Moode update. I doubt its related to the system crash.

-Tim
 
Thank you, still does not work. All files are on a NAS and streamed via wired LAN.
I can only get flac 16/44.1 to work corectly. 24/96 give me rhythmic click (pop) noise and my ears hurt from ultrasonic noises DSD, mp3 radio streams have a white noise overlay over the music.

Also, accessing moode via chrome on android, in the library tab, the first column is "Albums", i have around 1,500 albums, normal usage scenario is that first column should be Album Artist and Albums after. Is there a way to change this? Also, couldn't care less about the genre, tab, can i remove it and replace it with something useful?
Last , but not least, can i enable tiled view for artists and albums?

Hi,

That result suggests a compatibility issue between the DAC and the Linux USB audio driver in the 4.4.50 Std and 4.4.39 Adv kernels that Moode uses. There are a couple of DAC's for example M2Tech Hiface that require a custom usb audio driver thats not generally compiled into Raspbian Linux.

I have a number of TODO items for the Library including options for choosing what to use for certain columns. Plan is to work on these for Moode 4.0 release (end of year).

If by tiled you mean a grid of album cover art, its on the TODO list to investigate.

-Tim
 
Hi,

That result suggests a compatibility issue between the DAC and the Linux USB audio driver in the 4.4.50 Std and 4.4.39 Adv kernels that Moode uses. There are a couple of DAC's for example M2Tech Hiface that require a custom usb audio driver thats not generally compiled into Raspbian Linux.

I have a number of TODO items for the Library including options for choosing what to use for certain columns. Plan is to work on these for Moode 4.0 release (end of year).

If by tiled you mean a grid of album cover art, its on the TODO list to investigate.

-Tim


Thanks Tim, I thought that if volumio and Rune works, moode should work too. It is strange that mp3 is also problematic as the stream should be PCM 16/44.1 as a normal FLAC.
Regarding tiles, you understood correctly
 
Hi,

The RT kernel is experimental so no guarantee of stability. If you are mostly using Moode as a DLNA server then I'd recommend running the Standard kernel.

The OutputThread error that appears in MPD log is fixed in next Moode update. I doubt its related to the system crash.

-Tim

Some info on setting up audio threads when using the rt kernel.

The article goes into greater detail at the web site in the link. I've been using it for years with perfect trouble free audio using the rt kernel. Just a fyi, take it with a grain of salt.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SCHED_FIFO is a scheduling class of real-time enabled kernels. SCHED_FIFO processes can use all available CPU until another SCHED_FIFO process with higher priority needs it, and they take precedence over all other processes on a system. Consequently, a rogue SCHED_FIFO process has the potential to lock up the system.

On a real-time kernel (one that includes the RT patches and has the CONFIG_PREEMPT_RT option enabled), all interrupt handler top halves run SCHED_FIFO, with a priority of 50 by default. To ensure glitch-free audio, it is important that those responsible for audio operation have a higher priority than the others. Moreover, the jackd realtime threads should run at a priority higher than the standard IRQs but lower than the audio-related ones (use the -P option to set it accordingly, or the "Priority" value in qjackctl).


IrqPriorities - FFADO - Trac
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Thanks Tim, I thought that if volumio and Rune works, moode should work too. It is strange that mp3 is also problematic as the stream should be PCM 16/44.1 as a normal FLAC.
Regarding tiles, you understood correctly

Hi,

Similarities between the players are only superficial. The code, os, packages and config are completely different.

Audio info, Output stream shows the audio format that is actually being sent to the DAC. If you need more detail then try the cmd below.

cat /proc/asound/card1/pcm0p/sub0/hw_params

-Tim
 
Some info on setting up audio threads when using the rt kernel.

The article goes into greater detail at the web site in the link. I've been using it for years with perfect trouble free audio using the rt kernel. Just a fyi, take it with a grain of salt.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SCHED_FIFO is a scheduling class of real-time enabled kernels. SCHED_FIFO processes can use all available CPU until another SCHED_FIFO process with higher priority needs it, and they take precedence over all other processes on a system. Consequently, a rogue SCHED_FIFO process has the potential to lock up the system.

On a real-time kernel (one that includes the RT patches and has the CONFIG_PREEMPT_RT option enabled), all interrupt handler top halves run SCHED_FIFO, with a priority of 50 by default. To ensure glitch-free audio, it is important that those responsible for audio operation have a higher priority than the others. Moreover, the jackd realtime threads should run at a priority higher than the standard IRQs but lower than the audio-related ones (use the -P option to set it accordingly, or the "Priority" value in qjackctl).


IrqPriorities - FFADO - Trac
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hi,

Thats good stuff. I'll test out the strategy of going > 50.

Add the lines below to the [service] section of /lib/systemd/system/mpd.service and MPD won't throw the Output thread error.

LimitRTPRIO=99
LimitMEMLOCK=infinity

After editing

sudo systemctl daemon-reload
sudo systemctl restart mpd

-Tim
 
Hi,

Thats good stuff. I'll test out the strategy of going > 50.

Add the lines below to the [service] section of /lib/systemd/system/mpd.service and MPD won't throw the Output thread error.

LimitRTPRIO=99
LimitMEMLOCK=infinity

After editing

sudo systemctl daemon-reload
sudo systemctl restart mpd

-Tim

Hi Tim

Don't know if you went into the article itself. But after reading it I found that there are 'audio threads' who's priorities can be adjusted. Just a moderate adjustment of 70+/- provided really good benefits.

This info is from ALSA but the other info applies the same thing.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thread Priorities
The next and final step is to set a few thread priorities. The real time patch should have created several IRQ threads as well as added a “hrtimer” thread. These can be viewed with ps -e. Use the chrt command to set thread priorities (in Debian this is part of the schedutils package). It doesn't matter which order the priorities are set. Scan the output of the ps -e command looking for threads like “softirq-timer” and “softirq-hrtimer”, taking note of the pid of each one (on a dual core system there are two of each, one for each CPU). Find the pid of the IRQ thread that the sound card resides on. Looking at the output of cat /proc/interrupts should reveal this. Set new priorities for each thread:

Low latency howto - AlsaProject
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I usually create a script and put it in the path to run at boot.

I kept this so I would remember, pick and choose what you like or not. My script is at the bottom of the page.
https://sites.google.com/site/computeraudioorg/setting-up-alsa
 
The nature of a NAS is that it stays on for when network users require it.

Turn your NAS on first.

Mine is on 24/7. If I just wanted casual storage, I would have used a portable disk.

Sadly I cannot keep the NAS on 24x7 since ambient temperatures are well over 40 deg. Celcius.

I might have to consider a small USB hard disk, but then getting new media onto it will require more efforts.
 
wifi dongle not working

Hi
I use a raspberry pi2b with moode audio. USB DAC Rockna RD 40 4x pcm1704
I tray all software on the internet, moode is the best in my opinion.
One problem i found on all software:
Wifi dongle using rtl 8192 dosen't work
I have a TP Link TL WN823N
How to make this wifi adapter to work?
I read a lot on the internet but no luck
thanks
 
Sadly I cannot keep the NAS on 24x7 since ambient temperatures are well over 40 deg. Celcius.

I might have to consider a small USB hard disk, but then getting new media onto it will require more efforts.

I use to keep all my (Flac) music files on a single (256G) usb stick; then I ran out of space for new music. Plus it was a bit of a pain to keep in sync with my desktop computer.

Now, I have an old PC running Minimserver and use BubbleUp as a control point to stream to Moode Audio. It works flawlessly, best of all the server is shutdown when not in use. This setup also allows me to stream synchronized background music to various Chrome audio devices around our house.