Moode Forum
Custom Filters for Random play - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8)
+--- Thread: Custom Filters for Random play (/showthread.php?tid=5689)

Pages: 1 2


Custom Filters for Random play - Uk0kA - 07-09-2023

I've been using Musicbee on a secondary setup and find its AutoDJ Custom Filter really cool. By tweeking it to my liking, I now feel like i'm getting a true random playlist of my music library. I love MoodeAudio and would love to see something similar implemented in the future. Basically, tag field is available as a filter and also fields such as Play Count, Last played album/artist, likes and skip counts, etc.

Putting it out there in the universe. It feels like a cool feature that could be easily implemented.


RE: Custom Filters for Random play - Tim Curtis - 07-09-2023

If it can "be easily implemented" then feel free to contribute the code :-)

Couple of things:

1. Metadata including play counts, last played, likes, skip counts are not maintained by MPD. They could be by making use of the MPD sticker database but is a significant coding effort. I think there was a post by @cprogrammer about this?
2. The Auto shuffle feature already supports a tag filter. Below is the ( i ) help for the feature.

Code:
String of TAG VALUE pairs that Auto-shuffle uses to select the tracks being shuffled. Only one occurrence of a given TAG is allowed. The filter is case insensitive and it performs a TAG contains VALUE substring match.
Ex:  genre "indie rock" artist coldplay
Ex:  filename "NAS/Music/Led Zeppelin"



RE: Custom Filters for Random play - Uk0kA - 03-05-2024

(07-09-2023, 11:21 PM)Tim Curtis Wrote: If it can "be easily implemented" then feel free to contribute the code :-)

Couple of things:

1. Metadata including play counts, last played, likes, skip counts are not maintained by MPD. They could be by making use of the MPD sticker database but is a significant coding effort. I think there was a post by @cprogrammer about this?
2. The Auto shuffle feature already supports a tag filter. Below is the ( i ) help for the feature.

Code:
String of TAG VALUE pairs that Auto-shuffle uses to select the tracks being shuffled. Only one occurrence of a given TAG is allowed. The filter is case insensitive and it performs a TAG contains VALUE substring match.
Ex:  genre "indie rock" artist coldplay
Ex:  filename "NAS/Music/Led Zeppelin"

I really wish I could contribute but currently know nothing about coding or the efforts required. I'm open to learning though if you can point me in the right direction/language.

I was rethinking about this and wondered if perhaps it would be easier to add a feature on the Playlist side of things?
For example, create a random list of 100 songs with some filters like the tags implementation and something like No songs from the same album/same artist, or exclude X and Y, only recently added, etc.


RE: Custom Filters for Random play - Nutul - 03-05-2024

(03-05-2024, 03:03 PM)Uk0kA Wrote: I really wish I could contribute but currently know nothing about coding or the efforts required.
That was the point... I know nothing vs easy to implement.

Then, what's wrong with shuffle?


RE: Custom Filters for Random play - Uk0kA - 03-05-2024

(03-05-2024, 04:29 PM)Nutul Wrote:
(03-05-2024, 03:03 PM)Uk0kA Wrote: I really wish I could contribute but currently know nothing about coding or the efforts required.
That was the point... I know nothing vs easy to implement.

Then, what's wrong with shuffle?

My personal issue is that I enjoy a very diversified randomized shuffle of my entire music library.
What will often happen are the following:
  • Same Artist being played within 5 songs
  • Same Artists/ Albums being rotated within 10 songs.
  • Generally speaking, often the same albums/Artists. Like it only looks at a portion of my huge music library.
Minor stuff in the grand scheme of things and I'm sure it's not intended but that's my experience on a daily basis.

While not able to actually contribute with code, I'm here providing user experience for the great devs of Mood Audio to consider new ideas to improve this already great platform.


RE: Custom Filters for Random play - Tim Curtis - 03-05-2024

Are you using Auto-shuffle or just plain MPD shuffle?


RE: Custom Filters for Random play - Uk0kA - 03-05-2024

(03-05-2024, 08:37 PM)Tim Curtis Wrote: Are you using Auto-shuffle or just plain MPD shuffle?

I have Auto-Shuffle enabled in the MPD options.


RE: Custom Filters for Random play - Tim Curtis - 03-05-2024

How many tracks in your collection?


RE: Custom Filters for Random play - Uk0kA - 03-05-2024

(03-05-2024, 09:02 PM)Tim Curtis Wrote: How many tracks in your collection?

12790 tracks on 1137 albums.


RE: Custom Filters for Random play - Tim Curtis - 03-05-2024

Its odd that the shuffle is not more randomized than what you are experiencing.

In any case here is the project repo and documentation You can read about the shuffle algorithm.
https://github.com/joshkunz/ashuffle

There is a window-size parameter that may help increase randomness but someone would have to add it to the ashuffle launch string to test if it actually works.

Its function startAutoShuffle() in file /var/www/inc/music-library.php