1. 26
  1.  

  2. 4

    Good read.

    The only thing I missed was code (or pseudo-code) that would show how one could implement the algorithm. I don’t know about you, but I understand a lot better from an example.

    1. 1

      The linked blog post (http://keyj.emphy.de/balanced-shuffle/) has the most interesting content by far. It provides a clear explanation of the new shuffle concept, including spacing and merge algorithms.

      I had never heard of “maximum spread” principle, and immediately started to implement a functional version of this using random numbers. The results were surprisingly bad…which makes sense in retrospect for the same reason that purely random track shuffling is bad. Next pass was similar to the method described in the post (split existing elements into padded segments, with a random placement inside the segment).

      The open problem is how individual tracks are grouped such that they can be effectively shuffled. Presumably artist, album, and genre are enough to make it work; perhaps more granular attributes like BPM are also used.