D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Playlist generator

 

On 07/06/2018 10:10, stinga wrote:
G'day all,

I have a need for a playlist generator that will create a playlist of a certain length I.E. 58 minutes.
I have been searching the intertubes and been failing.

Ideally with source code so I can hack it and incorporate into my process. Really I just want to strip out the calculation part so I don't have to think about it too much! :-)

playlist length = p
From your list of potential plays calculate the mean length and standard deviation.
m = mean
s = standard deviation
Take a random sample of plays exceeding total size (p+3m)
re-calculate m and s based on your random sample
from new plays identify plays of size m-2s, m-s, m (or those closest to those)
remove the identified plays above from the random sample
collate playes together in play list until size is within p-2s and p
pad p the previously removed plays until size of playlist is closest to p


--
The Mailing List for the Devon & Cornwall LUG
https://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq