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


Forum Jump: