Thank you for your donation!


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


Solved: Auto-shuffle does not appear to work
#1
Hello folks, new moOde user here.

I went looking for how to set up a random playlist of my entire library of music that's held on a NAS. Found the advice that mpd is not great at playlists over a few hundred items, and I've got over 16K tracks. Same post said to use auto-shuffle, and then moOde should just do the right thing (http://moodeaudio.org/forum/showthread.php?tid=653).

Alas, it moOde does not appear to do the right thing, or I'm doing the wrong thing.

Test 1:
  • Load playback view
  • Clear the queue
  • Navigate to NAS/Vault/<artist>/<album> and add one song to the playlist
  • Click the playback bar to go to the playback view
  • Click play
  • Playback of selected song starts
  • Click next track
  • Playback of selected song starts again from the beginning of the track
Test 2:
  • As with test 1, but before clicking play, click the shuffle/random icon
  • Same behaviour as test 1 for play/next track
Test 3:
  • As with test 1, but before clicking play, click the triple dot, tick Consume
  • Same behaviour as test 1 for play/next track
Test 4:
  • Repeat test 2, but enable Consume
  • Same behaviour as test 1 for play/next track
Test 5:
  • Load playback view
  • Remove entry from queue
  • Ensure consume is not set
  • Ensure random is not set
  • Click play
  • Nothing happens
Test 6:
  • Test 5, but with consume set
  • Same result
Test 7:
  • Test 5, but with random set
  • Same result
Test 8:
  • Test 5, but with random and consume set
  • Same result
Test 9:
  • As with test 1, but add two songs to the playlist
  • Switch to playback view
  • Enable consume
  • Enable random
  • Play
  • Next track - first played song is consumed
  • Next track - no new tracks are loaded from the library, current song restarts

Test 10:
  • Audio settings
  • Disable auto shuffle
  • Enable auto shuffle
  • Don't change from Track and None
  • Go to playback view
  • Click triple-dot to check Consume setting
  • Consume is not ticked (quick help says it's enabled by auto-shuffle)
  • Random is not enabled (enabling auto-shuffle does say it disables random)
  • Click play
  • Nothing happens
Test 11:
  • Audio settings
  • Change filter to: artist dido
  • Library
  • Search "dido" to confirm matches are found
  • Playback view
  • Play
  • Nothing happens
Debug log shows nothing like failure messages.

Code:
S Y S T E M   P A R A M E T E R S

moOde release = 7.2.1 2021-05-06
RaspiOS = 10.6
Linux kernel = 5.4.77+ #1371
Platform = Pi-Zero 1.3 512MB
Architecture = armv6l (32-bit)
System uptime = up 24 minutes
Timezone = Europe/Dublin
Current time = 2021-05-23 12:35:00

Host name = moode
Ethernet address = unassigned
Ethernet MAC = no adapter
WLAN address = 192.168.0.166
WLAN MAC = 00:c1:41:07:10:53
WLAN country = IE

SoC identifier = bcm2835
Core count = 1
Kernel timer freq = 100 Hz
SDCard freq = 50 MHz
USB boot = not available
Warranty = OK

Root size = 3.9G
Root used = 78%
Root available = 854M
Root expand = not expanded
Memory free = 102 MB
Memory used = 94 MB
SoC temperature = 33.6°C
Throttled bitmask = 0x0
Throttled text = No throttling has occurred

CPU governor = ondemand
Onboard WiFi = None
Onboard BT = None
HDMI output = On
LED state = 1,1
Eth addr wait = Off
USB auto-mounter = udisks-glue
Max USB current = Off
SSH term server = Off

PHP-FPM version = 7.3.19
NGINX version = 1.14.2
SQLite3 version = 3.27.2
Hostapd version = 2.8-devel
WiringPi version = 2.50
RPi.GPIO version = 0.7.0

A U D I O   P A R A M E T E R S

Audio device = IQaudIO Pi-DACZero
Interface = I2S
Mixer name = Digital
Hardware mixer = Yes
Supported formats = S16_LE, S24_LE, S32_LE
ALSA max volume = 100
ALSA loopback = Off
MPD max volume = 100
Volume step limit = 10
Display dB volume = On
Audio source = Local
Output device = Local
Resume MPD = No
Volume knob = 77
Volume mute = Unmuted
Saved MPD vol = 0
Preamp volume = 0
ALSA version = 1.1.8-1+rpt1
SoX version = 0.1.2-3

Bluetooth controller = Off
Pairing agent = Off
Airplay receiver = On
Spotify receiver = Off
Squeezelite = Off
RoonBridge = Not installed
UPnP client = Off
DLNA server = Off
GPIO button handler = Off
UPnP browser = Off

Auto-shuffle = On
Ashuffle mode = Track
Ashuffle filter = None
Autoplay = Off
Rotary encoder = Off
Encoder params = 100 2 3 23 24
USB volume knob = Off
Polarity inversion = Off
Crossfeed = Off
Crossfade = Off
Parametric EQ = Off
Graphic EQ = Off
CamillaDSP = off
MPD httpd = Off
Ignore CUE files = Yes

P R E F E R E N C E S

Appearance
----------------------
Theme = Default
Accent color = Turquoise
Alpha blend = 1.0
Adaptive background = No
Background image = No
Cover backdrop = No
Cover blur = 20px
Cover scale = 1.25
Renderer backdrop = Yes
Font size = Normal

Playback
----------------------
Show Queue thumbs = Yes
Show extra metadata = album,genre,track,disc,date,composer,conductor,performer,encoded
Search site = Disabled
Playback history log = No

Library
----------------------
One touch action = Play
Albumview sort order = by Artist
Tagview sort order = by Artist
Recently added = 1 Year
Show sample rate = No
Cover search pri = Embedded cover
Pixel ratio = 1.5
Thumbnail resolution = Auto
Thumbnail columns = 6/2 (Default)

Library (Advanced)
----------------------
Tag view artist = Artist
Album key = Album@Artist (Default)
Include comment tag = No
Library filter = full_lib
Library filter str =
Ignore articles = a,an,the
Show tagview genres = Yes
Show tagview covers = Yes
Ellipsis limited text = No
UTF8 character filter = No

CoverView
----------------------
Automatic display = Never
Backdrop style = Gradient (Linear)

R A D I O   M A N A G E R   S E T T I N G S

Sort tag = Name
Group method = No grouping
Show moOde stations = No action
Show other stations = No action

M P D   S E T T I N G S

Version = 0.22.6_p0x3
Volume mixer = hardware
ALSA device = hw:0
SoX resampling = disabled
Selective resampling = disabled
SoX quality = high
SoX multithreading = off
DSD over PCM (DoP) = no
Replaygain = off
Replaygain preamp = 0
Volume normalization = No
Audio buffer = 4 (MB)
Output buffer size = 128 (MB)
Max playlist items = 16384
Input cache = Disabled

B L U E T O O T H   S E T T I N G S

Bluetooth ver = 5.50
Bluealsa ver = v3.0.0
Speaker sharing = No
Resume MPD = No
PCM buffer time = 500000 (µs)

A I R P L A Y   S E T T I N G S

Version = 3.3.8
Friendly name = Moode Airplay
ALSA device = hw:0
Interpolation = soxr
Output bit depth = S16
Output sample rate = 44100
Session interruption = no
Session timeout = 120 (ms)
Latency offset = 0.0 (secs)
Audio buffer = 0.2 (secs)
Resume MPD = Yes

S P O T I F Y   S E T T I N G S

Friendly name = Moode Spotify
ALSA device = plughw:0
Bit rate = 160
Initial volume = 0
Volume curve = log
Volume normalization = No
Normalization pregain = 3
Autoplay = No
Resume MPD = No

S Q U E E Z E L I T E   S E T T I N G S

Version = 1.9.7-1270 "DSD/SRC enabled"
Friendly name = Moode
ALSA device = hw:0
ALSA params = 80:4::1
Output buffers = 40000:100000
Task priority = 45
Codec list = flac,pcm,mp3,ogg,aac,alac,dsd
Other options = -W -D 500 -R E -S /var/local
Resume MPD = No

L O C A L   D I S P L A Y   S E T T I N G S

Local UI display = Off
Mouse cursor = On
Screen blank = 600 Secs
Wake display on play = Off
Brightness = 255
Pixel aspect ratio = Default
Rotate screen = 0 Deg

M O O D E   S T A R T U P   L O G

20210523 121103 worker: -- Start
20210523 121104 worker: Successfully daemonized
20210523 121105 worker: Integrity check (passed)
20210523 121110 moode.php: MPD connect failed: cmd=(playlist)
20210523 121111 worker: File check (OK)
20210523 121112 moode.php: MPD connect failed: cmd=(playlist)
20210523 121114 moode.php: MPD connect failed: cmd=(playlist)
20210523 121114 worker: Session vacuumed
20210523 121115 worker: Session loaded
20210523 121115 worker: Debug logging (OFF)
20210523 121115 worker: -- Audio debug
20210523 121115 worker: ALSA cards: (0:IQaudIODAC | 1:empty | 2:empty | 3:empty
20210523 121115 worker: MPD config: (0:IQaudIO Pi-DACZero | mixer:(Digital) | card:0)
20210523 121115 worker: ALSA mixer actual (Digital)
20210523 121201 worker: ALSA Digital volume set to (0%)
20210523 121201 worker: -- System
20210523 121201 moode.php: MPD connect failed: cmd=(playlist)
20210523 121206 worker: Host     (moode)
20210523 121206 worker: moOde    (7.2.1 2021-05-06)
20210523 121206 worker: RaspiOS  (10.6)
20210523 121206 worker: Kernel   (5.4.77+ #1371)
20210523 121206 worker: Platform (Pi-Zero 1.3 512MB)
20210523 121206 worker: ARM arch (armv6l, 32-bit kernel)
20210523 121206 worker: MPD ver  (0.22.6_p0x3)
20210523 121206 worker: CPU gov  (ondemand)
20210523 121206 worker: USB boot not available
20210523 121207 worker: File system not expanded yet
20210523 121207 worker: HDMI port on
20210523 121207 worker: -- Network
20210523 121207 worker: eth0 does not exist
20210523 121207 worker: eth0 address not assigned
20210523 121207 worker: wlan0 exists
20210523 121207 worker: wifi country (IE)
20210523 121207 worker: wlan0 trying SSID (Barbados)
20210523 121207 worker: IP addr (192.168.0.166)
20210523 121207 worker: Netmask (255.255.255.0)
20210523 121207 worker: Gateway (192.168.0.1)
20210523 121208 worker: Pri DNS (192.168.0.53)
20210523 121208 worker: Domain  (local)
20210523 121208 worker: -- Audio config
20210523 121209 worker: MPD conf updated
20210523 121209 worker: ALSA card number (0)
20210523 121209 worker: MPD audio output (IQaudIO Pi-DACZero)
20210523 121210 worker: Audio formats (S16_LE, S24_LE, S32_LE)
20210523 121210 worker: ALSA mixer name (Digital)
20210523 121210 worker: MPD volume control (hardware)
20210523 121210 worker: Hdwr volume controller exists
20210523 121210 worker: Max ALSA volume (100%)
20210523 121210 worker: ALSA loopback (Off)
20210523 121210 worker: Reset renderer active flags
20210523 121210 worker: CamillaDSP (off)
20210523 121210 worker: -- MPD startup
20210523 121211 worker: MPD started
20210523 121215 worker: MPD accepting connections
20210523 121215 worker: MPD output 1 ALSA Default (on)
20210523 121215 worker: MPD output 2 ALSA Bluetooth (off)
20210523 121215 worker: MPD output 3 HTTP Server (off)
20210523 121215 worker: MPD crossfade (off)
20210523 121215 worker: MPD ignore CUE files (yes)
20210523 121215 worker: -- Feature availability
20210523 121215 worker: Source select (available)
20210523 121215 worker: Source select (source: MPD)
20210523 121215 worker: Source select (output: IQaudIO Pi-DACZero)
20210523 121215 worker: Bluetooth (available)
20210523 121215 worker: Airplay renderer (available: started)
20210523 121215 worker: Spotify renderer (available)
20210523 121215 worker: Squeezelite (available)
20210523 121215 worker: RoonBridge renderer (not installed)
20210523 121215 worker: UPnP renderer (available)
20210523 121215 worker: DLNA server (available)
20210523 121215 worker: UPnP browser (available)
20210523 121215 worker: GPIO button handler (available)
20210523 121215 worker: Stream recorder (n/a)
20210523 121215 worker: -- Music sources
20210523 121216 worker: USB sources (none attached)
20210523 121218 worker: NAS and UPnP sources (mountall initiated)
20210523 121218 worker: -- Other
20210523 121218 worker: USB volume knob (Off)
20210523 121218 worker: USB auto-mounter (udisks-glue)
20210523 121218 worker: LED0 (On)
20210523 121218 worker: LED1 (sysclass does not exist)
20210523 121218 worker: Saved MPD vol level (0)
20210523 121218 worker: Preamp volume level (0)
20210523 121218 worker: MPD volume level (77) restored
20210523 121219 worker: ALSA Digital volume (94%)
20210523 121219 worker: Auto-play (Off)
20210523 121219 worker: Random Play reset to (Off)
20210523 121219 worker: Maintenance interval (3 hours)
20210523 121219 worker: Screen saver activation (Never)
20210523 121219 worker: Session permissions (OK)
20210523 121219 worker: Watchdog started
20210523 121219 worker: Ready
Reply
#2
Could be out-of-memory issue. Auto-shuffle uses RAM to store the randomized collection of tracks.

To troubleshoot try running it from command line and look for error messages,

1. Turn it off in Audio Config.
2. Run command below

Code:
/usr/local/bin/ashuffle --queue-buffer 1
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Well, right after doing all that testing, I noticed that somehow the albums/tags view was only showing a few albums despite scanning the entire NAS share; the random/star icon was pretty much only loading three different albums, despite browsing to Library/NAS/<name> showing all of my albums.

I deleted the library, updated the library from the M menu, re-created it, and re-updated.

Reset the auto-shuffle to on, cleared the filter.

Went to playback. Ensured nothing was in the queue. Ensured consume was set. Clicked random to get it highlighted. Clicked play. 10 seconds later (mpd is still indexing the NAS, so the Pi is struggling a bit) two random tracks popped into the queue and the first one started to play.

(We crossed Tim, I was writing this as you replied.)

Looking at memory usage, I think the Pi is doing ok - 112 MB used, 236 MB for buffer/cache, 92 MB free.

I suspect that somehow perhaps mpd wasn't very happy, given the fact a library reset appears to have fixed everything (with no reboots). The UI is struggling to keep up with what's actually playing at the moment, but I'm going to put that down to the (in modern terms) fairly anaemic Pi Zero processor that's busy with all of mpd's work to index the library.
Reply
#4
Thanks for the really quick response.
Reply


Forum Jump: