Page 1 of 1

Random-ness

PostPosted: 08 Dec 2015, 01:47
by Cayenne
All I want to know is:
#1 Can I randomize my entire collection?
#2 Can I play it back from this "scrambled" order from the first track to the last track after stopping at times to play other stuff and then return to my random playlist and pickup where I left off?????
#3 If so where does the randomness come from? I assume the sudo-random number generator or a random file from the cpu platform or is there a more advanced option for randomness like Random.org or a hardware based true random number generator? (lots of entropy I hope!!)

I have a Rpi/Hifiberry set-up coming in the mail as I write this. I have never liked the random features of iTunes, Zune, Roxio, WinAmp and umpteen other audio players. I want, NO need TRUE randomness for playback and resume-ability of this playlist!

Short of these things, would this feature be implementable in ArchLinux?


Anal about Audio....Cayenne

Re: Random-ness

PostPosted: 15 Dec 2015, 01:31
by Cayenne
Really?.....nobody???

Re: Random-ness

PostPosted: 15 Dec 2015, 23:18
by hondagx35
Hi Cayenne,

i have one RuneAudio device running with ashuffle.
It works like a charm and should be what you are searchin.
Implementing this in the official image is on the road map (as far as i know).

Modes:
In the second (more interesting) mode, ashuffle will wait until the last song in the queue has finished playing, at which point it will add another song to the queue. In this creates a 'stream of music' where songs will be continuously played, at random, to infinity. Additionally, since ashuffle only adds one song at a time, and only adds that song once the last song in the playlist has finished playing, you still retain control over your queue. This way, you can add some song you want to hear to the queue, and the random songs will simply continue afterwards.

Additionally, ashuffle uses mpd's idle functionality so it won't drain cpu polling to check if the current song has advanced.

To use the second mode, run ashuffle without the --only argument.

$ ashuffle


shuffle algorithm

Currently ashuffle is using a fairly unique algorithm for shuffling songs. Most applications fall into two camps: true random shuffle, and 'random list' shuffle. With true random shuffle, no restrictions are placed on what songs can be selected for play. It's possible that a single song could be played two or even three times in a row because songs are just being draw out of a hat. With 'random list' shuffle, songs to be shuffled are organized into a list of songs behind the scenes. This list is then scrambled, and then played like a normal playlist. Using this method songs won't be played twice in a row, but the once the playlist has been played it will either loop (playing the same random set again), or be re-scrambled and played again, so it can still get repetitive. Also, since there's no chance that a song can be played again, it won't feel very random, especially when listening for a long time. I often start noticing song order once the random-list wraps around.

ashuffle's approach is an attempt at a happy medium between these two approaches. Essentially, it keeps two lists of songs, a 'pool' of the songs it's shuffling, and a 'window' which is a short, ordered, playlist of songs. When the program starts, ashuffle builds the window randomly by taking songs out of the pool, and adding them to the window. When a new random song is added to the MPD queue, the 'top' song of the window, is taken off, added to the queue, and then put back into the pool. Then another song is added to the window so that the next request can be fulfilled.


Frank

Re: Random-ness

PostPosted: 21 Dec 2015, 15:49
by Cayenne
Thanks Frank, that sounds interesting! I just got my Rpi/hifiberry working and the random feature seems to survive (playback position) a reboot and that is important. What I haven't tried is: will the playback position in a randomized playlist survive after clearing and adding a different playlist?

But mainly my question is this: Where does the random-ness come from? is it using the hardware based RNG on the Pi? I want true random playback through my entire collection without replays. A progress bar or some kind of meter showing percentage of collection played/unplayed would be nice too!

Re: Random-ness

PostPosted: 21 Dec 2015, 17:16
by hondagx35
Hi Cayenne,

But mainly my question is this: Where does the random-ness come from?

In the current implementation Rune uses the random function from mpd (Music Player Daemon).
If you really want to know how it is implemented, you have to read the source code or ask the developers.

Did you read the description of ashuffle?
If i were you i would try this.

Frank

Re: Random-ness

PostPosted: 24 Oct 2016, 22:13
by blibble
hello there.... i can't seem to find any shuffle options in the MPD menu, not can i work out how to install ashuffle from GitHub (archlinux is new to me.. reading fast)..... what very simple thing am i missing here?

ta very
best
B

Re: Random-ness

PostPosted: 25 Oct 2016, 17:21
by hondagx35
Hi

ashuffle is installed on the latest images for RP2/3 and ODROID.

You can find it as
Global random OFF / ON
(EXPERIMENTAL) Toggles the global random, which adds a random song to the queue when it reaches the end. Changes will take effect after you restart your device.

Frank

Re: Random-ness

PostPosted: 25 Oct 2016, 17:25
by blibble
ahhhhh
ta frank....
is there anyway of me installing this on a p1?

Re: Random-ness

PostPosted: 26 Oct 2016, 05:16
by KHatfull
I just caught this thread and wondered what the global random was. RTFM I suppose, LOL!

This is great...

Re: Random-ness

PostPosted: 12 Nov 2016, 23:42
by vulpespersona
For what it's worth, I think 'ashuffle' is supported in the current version of Rune Audio. I thought I'd share a workaround to shuffle from my collection that works well.

I have a 1TB external USB drive feeding my Pi running Rune Audio and for a while was disappointed that i couldn't shuffle all without massive slowdowns...I share your sentiments about Itunes.

90% of the time i run Rune Audio seamlessly from the browser supported http://runeaudio.local/, including playing all from an artist directory and then shuffling the playlist but when i want to 'shuffle all' from my 1TB hard drive I use Mpod app on my Iphone which has a shake to shuffle feature that allows you to select 50 or 100 songs. Since this only grabs 100 songs it runs smoothly and still has the effect of shuffling all. I think this app uses 'ashuffle' to do this but i like the way i can just open that app, shake my iphone and instantly be listening to random songs from my collection. If i'm feeling picky i run through the hundred tracks and delete ones i don't want to come up.

Might not meet all your needs but this is a fairly easy way to suffle tracks without much modifications to the rune software and before a new version is released that includes this capability, which i was told will be integrated:

shuffle-100-tracks-other-feature-requests-t3230.html