logoalt Hacker News

staplungtoday at 5:33 PM5 repliesview on HN

Cool, but I don't see how it's sorting anything. It just seems to play a randomized arrangement of the slices. You can re-randomize as much as you like but there's no sort option as far as I can see.


Replies

joeypicklestoday at 5:44 PM

It randomizes slices of the sample and begins to play the slices in the random order. Meanwhile it begins the bubble sort algorithm at a pace that matches the tempo, sorting the slices into their chronological order. Throughout, it only plays the unsorted slices. (I was kinda hoping it would play the sorted sample at the end.)

show 1 reply
pdpitoday at 6:12 PM

The idea is that it slices the Amen Break into however many slices you specify, and the list being sorted is the indices for those slices. At each step, it plays the slice the pivot is being compared to.

Because it only plays the samples being compared, it never plays the sorted chunks, so it's missing a "punchline" of sorts.

hyperhellotoday at 5:46 PM

You're right. It doesn't play the sorted parts, which is strange. I expected to have a series of random-then-controlled slices with the random part getting shorter and the controlled part getting longer, but it really is just a shortening loop of random beats.

show 1 reply
dylan604today at 5:40 PM

Did you play it to the end? It's absolutely sorting from smallest to largest. Unless you have a confused understanding of a bubble sort, it's doing a bubble sort

show 2 replies
throwuxiytayqtoday at 5:37 PM

Give it a minute or two.