Thank you for your donation!


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


Custom Filters for Random play
#11
(03-05-2024, 09:23 PM)Tim Curtis Wrote: 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

Great! Something to sink my teeth into. thanks!
Reply
#12
(03-05-2024, 09:24 PM)Uk0kA Wrote:
(03-05-2024, 09:23 PM)Tim Curtis Wrote: 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

Great! Something to sink my teeth into. thanks!

Indeed MUCH more complicated than I could have guessed.
But yes, I'd say that the "window-size" parameter could work as a new option to queue up X unique songs from the collection.

And the function in music-library.php seems quite straight forward but I have no clue how to add the tweak:

Code:
--tweak window-size=7

anyone care to take a stab at it? I'll test it out.
Reply
#13
I actually think I figured it out . I added the tweak here in music-library.php

sysCmd($filter . '/usr/bin/ashuffle --queue-buffer 1 --tweak window-size=7 ' . $mode . $file . ' > /dev/null 2>&1 &');

I've tested it on a single album of 10 songs with a tweak of 7. Looks like it randomly choses 7 different songs in the initial "window"

I'll increase the window to 100 but for this tweak to be effective for my use case, it would have to also chose different albums and artist randomly.
Reply
#14
(03-06-2024, 01:35 AM)Uk0kA Wrote: I actually think I figured it out . I added the tweak here in music-library.php

sysCmd($filter . '/usr/bin/ashuffle --queue-buffer 1 --tweak window-size=7 ' . $mode . $file . ' > /dev/null 2>&1 &');

I've tested it on a single album of 10 songs with a tweak of 7. Looks like it randomly choses 7 different songs in the initial "window"

I'll increase the window to 100 but for this tweak to be effective for my use case, it would have to also chose different albums and artist randomly.

For those interested, I've also tried using the "--only" parameter which along with the tweak seem to be printing a very diverse and random list of songs
Code:
--only <number of songs to add>


ashuffle provides other options that I think would be great to add to future versions of Moode Audio. Including the --exclude and group parameters that I'll play with some more.
Nice to have list. Nothing essential of course.

thanks again for pointing me in the right direction
Reply
#15
I'm happy to see that some of the ashuffle options have made their way into version 9!

Now I'm wondering if there is any way to read from Moode's play history and to tell Auto Shuffle to Exclude Tag: Artist recently played?
Reply
#16
I don't quite understand how something like this would work.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#17
(11-27-2024, 05:56 PM)Tim Curtis Wrote: I don't quite understand how something like this would work.

I don't either. Still trying to figure out a way to avoid adding recently played artists when auto shuffling my whole digital library.
ashuffle developer had thought of how to implement this but unfortunately never added the feature.

Quote:If you'd like this feature in ashuffle, I'd propose instead a more configurable window-uniqueness. E.g. no two songs by the same artist can be in the window at the same time. With the standard window size of 7, and songs by artists A..Z, this would end up doing a shuffle like [A1, X9, F2, Q7, B2, R5, M1, A3, ...] Notice that A repeats before a song by every letter is played. This means that it wouldn't guarantee the interleave across all songs, just for the window length. I think that should be enough space between the artists to be good enough, and it fits better with ashuffle's model.
Reply


Forum Jump: