Moode Audio Player for Raspberry Pi

Firstly, Tim, great work, I really love moOde. I'm using v3.1 (advanced kernel) on a rpi3 & currently tinkering with v3.7 (std kernel) on a rpi2. Each have a Pifi Dac + 2.0, the chinese hifiberry clone,.

I have had no success installing either of the two advanced kernels on v3.7 on rpi2 (rev1.1).
I have attempted to install both type, and block have led to reflashing my sd card.
After install and reboot on the playback panel it is blank save for upper "playback cirle" and the skip, play/pause, skip bar beneath it, No vol, no playlist, no moode logo or other details. The library panel says everything is undefined, and the browse panel is completely blank. The system is sluggish and configure panel is unresponsive and often hangs. Interesting I discovered mpd was not running and when I started via command line it complains it has no config file. It starts if point it towards the config but on reboot it i not running. Reinstating the standard kernel has no effect, the system remains dysfunctional. I would like to use advanced kernels if possible. Has anybody reported similar occurrences?

Separately, I have had good success adding ir remote using the dac's built-in receiver, lirc and irexec. I have mapped my most commonly used controls, can jump to set volumes and if I press number 6, BBC 6 Music leaps onto the top of my playlist and starts playing. A wonderful thing about great software like moOde is they encourage curious amateurs to have a go at some scripting, providing a good way to learn. Since adding the second player I decided I need a script to fetch and load the playlist from the other player and obviously I want it work with my remote control. Good news is my bash script seems to work well from the command line. It however does not work with the remote control. I believe the problem is I need to use sudo to mv the playlist into /var/lib/mpd/playlists and I think irexec is not able/allowed to gain root privileges. irexec runs under user pi, with the lirrc file in the /home/pi folder. I also have my playlist transfer script in /home/pi. I have tried some ideas like the button running sudo myscript.sh but thus far nothing has worked. Perhaps somebody has experience on irexec and sudo in scripts? I will include my script but be kind, I am learning!

As regards moOde itself I do have a feature request. I would really find very very useful an "ADD NEXT" option on songs and folders. This would improve my usage vastly. However as it is present on volumio and rune I wonder if maybe there is not a technical reason it is absent from moOde? Anyway I think it would be valuable addition which would improve my user experience greatly.

Thanks for all the great work though!

Code:
#!/bin/bash

#######################################################################
# Script to transfer playlist of other moOde player to current player #
#######################################################################

if [ "nc -z moode.local 22 &> /dev/null" ];
then
        ssh [email]pi@moode.local[/email] 'if [ -e /var/lib/mpd/playlists/moodelist.m3u ]; then mpc rm moodelist; fi;
                                mpc save moodelist; cp /var/lib/mpd/playlists/moodelist.m3u /home/pi;';

        scp [email]pi@moode.local[/email]:/home/pi/moodelist.m3u /home/pi &> /dev/null;

        sudo mv moodelist.m3u /var/lib/mpd/playlists && mpc load moodelist &> /dev/null;
        exit 0;
else
        exit 1;
fi

Hi,

I have couple of Pi-2B's and no issues installing Adv kernels.

To troubleshoot try the following:

- start with fresh image
- install one of the Adv kernels
- BEFORE rebooting open an ssh session and examine moode log

cat /var/log/moode.log

- it should look similar to below

pi@rp4:~ $ cat /var/log/moode.log
20170616 103706 worker: Startup
20170616 103708 worker: Host (rp4)
20170616 103708 worker: Hdwr (Pi-2B 1GB v1.1)
20170616 103708 worker: Arch (armv7l)
20170616 103708 worker: Kver (4.4.50-v7+)
20170616 103708 worker: Ktyp (Standard)
20170616 103708 worker: Gov (performance)
20170616 103708 worker: OS (moodeOS 2.0)
20170616 103708 worker: Rel (Moode 3.7 2017-05-25)
20170616 103708 worker: Upd (None)
20170616 103708 worker: MPD (0.20.6)
20170616 103708 worker: Session loaded
20170616 103708 worker: Debug logging (off)
20170616 103708 worker: File check...
20170616 103709 worker: File check ok
20170616 103709 worker: USB sources (none attached)
20170616 103709 worker: MPD scheduler policy (time-share)
20170616 103709 worker: MPD started
20170616 103709 worker: wlan0 exists
20170616 103709 worker: wlan0 trying SSID (AirnetN2)
20170616 103709 worker: Rotary encoder driver loaded
20170616 103709 worker: HDMI port off
20170616 103709 worker: Audio (I2S audio device)
20170616 103709 worker: Audio (IQaudIO Pi-DigiAMP+)
20170616 103710 worker: Chip options applied
20170616 103710 worker: IQaudIO Pi-DigiAMP+ unmuted
20170616 103710 worker: ALSA mixer name (Digital)
20170616 103710 worker: MPD volume control (hardware)
20170616 103710 worker: MPD output 1 ALSA default (on)
20170616 103710 worker: MPD output 2 ALSA crossfeed (off)
20170616 103710 worker: MPD output 3 ALSA equalizer (off)
20170616 103710 worker: Hdwr volume controller exists
20170616 103710 worker: Volume level (0) restored
20170616 103710 worker: wlan0 (192.168.1.248)
20170616 103722 worker: eth0 exists
20170616 103722 worker: eth0 address not assigned
20170616 103722 worker: NAS sources (none configured)
20170616 103722 worker: MPD crossfade (off)
20170616 103722 worker: Watchdog started
20170616 103722 worker: End startup
20170616 103722 worker: Ready
20170616 103834 worker: Job install-kernel
20170616 103916 worker: install-kernel util.sh output (installing Advanced-LL kernel)
20170616 103916 worker: install-kernel util.sh output (flushing cached disk writes)
20170616 103916 worker: install-kernel util.sh output (Advanced-LL kernel installed)
20170616 103917 worker: install-kernel MPD scheduler (ts)
20170616 103917 worker: install-kernel Squeezelite scheduler (ts)
20170616 103917 worker: install-kernel Rotenc scheduler (ts)
20170616 103917 worker: install-kernel MPD cpu affinity (none)
pi@rp4:~ $


Btw, what does "Add Next" actually do?

-Tim
 
Thanks for the advice on the advanced kernel. I will try it when I get the opportunity.

Btw, what does "Add Next" actually do?

-Tim

Hi Tim, Add next would add a song or folder (or I suppose potentially a playlist) to the next position in the playlist so it plays immediately after the currently playing song.

I find when I am constructing on-the-fly playlists I often desire to be able to insert tracks next in the queue, when the current playing song is not the last song on the playlist.

There are of course work arounds with shifting track positions but this is clunky and click heavy.

This is the only feature I am surprised moOde does not have and I think people would find it useful. It often appears in other music players.
 
Hi Terry,

Whats an st4000 driver?

-Tim

Hi Tim,

For your information the ST4000 DAC is a ES9018MK2 DAC proposed by Audiophonics (please have a look on the following link ST4000 DAC ES9018K2M HDMI I2S TCXO 32Bit / 384kHz DSD256 pour Raspberry Pi - Audiophonics). This product is a chinese product from Suptronics with the X4000 reference.

There is no driver for this DAC and it is supported with the "RPI-DAC" option if you choose the I2S interface to manage it. It is also possible to use it through the HDMI interface: it was claimed to operate up to 32 bit 384 kHz, which I found not possible with Moode 3.7.

Regards,
 
Thanks for the advice on the advanced kernel. I will try it when I get the opportunity.



Hi Tim, Add next would add a song or folder (or I suppose potentially a playlist) to the next position in the playlist so it plays immediately after the currently playing song.

I find when I am constructing on-the-fly playlists I often desire to be able to insert tracks next in the queue, when the current playing song is not the last song on the playlist.

There are of course work arounds with shifting track positions but this is clunky and click heavy.

This is the only feature I am surprised moOde does not have and I think people would find it useful. It often appears in other music players.

Hi,

Well, no one has asked for it before. You are the first.

-Tim
 
Hi Tim,

For your information the ST4000 DAC is a ES9018MK2 DAC proposed by Audiophonics (please have a look on the following link ST4000 DAC ES9018K2M HDMI I2S TCXO 32Bit / 384kHz DSD256 pour Raspberry Pi - Audiophonics). This product is a chinese product from Suptronics with the X4000 reference.

There is no driver for this DAC and it is supported with the "RPI-DAC" option if you choose the I2S interface to manage it. It is also possible to use it through the HDMI interface: it was claimed to operate up to 32 bit 384 kHz, which I found not possible with Moode 3.7.

Regards,

Hi,

AFAIK the HDMI audio interface is limited to 16/48 in Linux 4.4 branch kernels. I believe this gets bumped up to 24/192 in the 4.9 branch.

-Tim
 
Hey Tim,

Thanks for the new versions with updated dependencies.

I sent you my mail on a PM. Looking forward to testig 3.8.

Thanks!

Rafa.

Hi Rafa,

It will take me a day or so to get a TR made. You might also want to check out the thread below and the corresponding Git repo. I'm not sure whether the latest mainline 0.20.9 MPD contains some or all the patches mentioned in the thread.

-Tim

http://www.diyaudio.com/forums/pc-b...d-sacd-iso-native-dsd-more-4.html#post5108984

https://github.com/xxxbugxxxx/MPD
 
Hi,

From what I understand after investigating, when bit depth format is not specified Squeezelite chooses an output bit depth that it thinks is best for the audio device. If this bit depth is > than input bit depth then only zero-padding occurs and the original bits are not altered, i.e., still bit-perfect.

-Tim

Thanks Tim. But zero-padding on output stream can result in truncating/dithering/rounding on DAC/SPDIF receiver. These kinds of thing are all SRC, and all SRCs leave some artifacts on stream signal. So it is probably better to leave the original bit depth of bit stream untouched.

Could you find a way to preserve the original bit depth?
 
Thanks Tim. But zero-padding on output stream can result in truncating/dithering/rounding on DAC/SPDIF receiver. These kinds of thing are all SRC, and all SRCs leave some artifacts on stream signal. So it is probably better to leave the original bit depth of bit stream untouched.

Could you find a way to preserve the original bit depth?

Hi,

AFAIK zero-padding or bit-padding preserves the original quantized value. The DAC would receive the same quantized value for 16 bit and for 16 bit padded to 32 bit. Padding is not the same as Sample Rate Conversion.

You might want to ask your question about bit depth on the Squeezelite forum and see if the dev can provide some insight.
Announce: Squeezelite - a small headless squeezeplay emulator for linux (alsa only))

-Tim
 
Hi @dkdkdk,

I don't think conditional resampling can be done with MPD because it doesn't provide a way to run code between tracks as its processing its play queue.

Begin able to run code before the next track in the queue plays would allow the sample rate of the file to be checked and then SoX resampling set accordingly.

The other issue is that MPD has to be restarted whenever the resampling rate changes.

-Tim
 
...
Separately, I have had good success adding ir remote using the dac's built-in receiver, lirc and irexec. I have mapped my most commonly used controls, can jump to set volumes and if I press number 6, BBC 6 Music leaps onto the top of my playlist and starts playing.

Hi FizzyTea
I also have that pifi dac+ from china and would be interested to know how you managed to activate and use that IR receiver. I would like to add a hardware or remote controlled play/pause button so that i can pause immediately when i am interrupted during my music listening sessions. I have missed some phone calls trying to reach for my phone, unlock it and pause the music.
 
Hi FizzyTea
I also have that pifi dac+ from china and would be interested to know how you managed to activate and use that IR receiver. I would like to add a hardware or remote controlled play/pause button so that i can pause immediately when i am interrupted during my music listening sessions. I have missed some phone calls trying to reach for my phone, unlock it and pause the music.

Hi, I will post a brief guide to what I did when I return after the weekend.
 
Hi @Soldeed,

Does your entire collection appear in the Browse panel?

Due to the caching mechanism, if the Library tab is pressed before DB update completes the Library panel will be incomplete. Either rerun DB update and wait for it to complete or enter the cmd below in an ssh session.

sudo truncate /var/local/www/libcache.json --size 0

Note that moOde 3.8 includes a "Reset Lib Cache" button on the Sources screen.

If you suspect that your issue is not "incomplete Library cache" then examine MPD log to see whats going on.

cat /var/log/mpd/mpd.log

-Tim
 
Hi @Soldeed,

Does your entire collection appear in the Browse panel?

Due to the caching mechanism, if the Library tab is pressed before DB update completes the Library panel will be incomplete. Either rerun DB update and wait for it to complete or enter the cmd below in an ssh session.

sudo truncate /var/local/www/libcache.json --size 0

Note that moOde 3.8 includes a "Reset Lib Cache" button on the Sources screen.

If you suspect that your issue is not "incomplete Library cache" then examine MPD log to see whats going on.

cat /var/log/mpd/mpd.log

-Tim
I ran both of the above and the log shows that it is only recognizing the flac files in the directory and not the mp3's.

The music directory has not been touched.
 
Hi @soldeed,

Ran a quick test with a couple of .mp3 files on a USB stick and no issues.

IME when files are not picked up by MPD db update its usually due to file/folder corruption, bad permissions, something in the file system or network share, etc.

-Tim

Thanks Tim I am going to start from scratch reformat microSD and music source HD.
 
Last edited: