frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Bubble Sorted Amen Break

https://parametricavocado.itch.io/amen-sorting
85•eieio•1h ago

Comments

eieio•1h ago
(the amen break is one of the most commonly-sampled drum breaks in popular music: https://en.wikipedia.org/wiki/Amen_break)
zonkerdonker•1h ago
And a tragic story at that:

>Coleman died homeless and destitute in 2006. It was unlikely he was aware of the impact he had made on music. Neither he [band leader Spencer] nor Coleman received royalties for the break.

hnlmorg•57m ago
I’ve heard conflicting accounts about their knowledge and royalties.

While I’m certain they didn’t receive royalties from all artists, I heard many 80s artists did. And Amen Brothers took others to court. So they would have know about the use of the break.

I will admit I haven’t done any independent research into this matter personally. Just echoing accounts I’ve read and taking their reports at face value.

tialaramex•45m ago
A reminder that your society will be judged not on how the most fortunate lived but how the least fortunate lived. Context still matters but there's a meaningful difference between "Anne Brontë died of Consumption (Tuberculosis), at that time there was no cure" and "Dave died of TB, he couldn't afford the cure at current market prices".
exDM69•1h ago
That's a fun two minutes for any computer scientist drum and bass fan.
staplung•1h ago
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.
throwuxiytayq•1h ago
Give it a minute or two.
dylan604•1h ago
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
hnlmorg•1h ago
Not the OP but I stopped listening pretty quickly because I was confused about how it was sorted.

It wasn’t until I read your comment that I realised the sorting happened while you were listening rather than before hand.

ricardobeat•48m ago
Same! thanks for saving the experience for me :)
lxgr•36m ago
So it's sorting from earliest to latest, really?
dylan604•31m ago
The value that is being sorted isn't obvious to me. It's obvious that it is sorting it. I'm guessing maybe some dB level of each of the hits/notes. If that was the case, I'd expect the initial unsorted view to line up with the pattern of the waveforms which is not the case. Maybe it's just an unsorted list of values sorted in sync to the rhythm. It's weird though that the segment corresponds to a segment of the audio. I just don't see how they are linked.
scrumper•16m ago
It's sorting by index of the slice. Pressing "shuffle" jumbles the slices up. So it puts the slices of the break back in the correct order. You never hear the result.

Set it to 8 slices and it becomes easy to see what it's doing: look at the waveform and the now-playing highlight jumping around.

joeypickles•1h ago
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.)
icambron•34m ago
I actually wanted it to play them as it went, so that it would be <unsorted><sorted> each time through, with the former shrinking and the latter growing.
hyperhello•1h ago
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.
butlike•12m ago
Would have been cool if it played the sorted ones at the end as a final run through victory lap
pdpi•38m ago
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.

sandwell•1h ago
It sounds like a Ventian Snares track. Love it.
marssaxman•1h ago
I can't help laughing. This is great.

I don't understand the comparison function, but it's really enjoyable listening to the algorithm work out its logic.

braebo•1h ago
No sound on iPhone. Shame Apple is so hostile to the web. Tragic really.
quag•59m ago
iOS seems to mute the web audio apis when the phone is in silent mode (the switch on the side of the phone). If you toggle it on, then this site (and many others) play sound.

I have no idea why it works this way and it’s frequently annoying.

bigstrat2003•50m ago
Why wouldn't it work that way? Whether it's a hardware toggle like on iPhone or a software one like in Android, I want silent to mean silent. Not "silent but if a web page decides to play sound it can".
tialaramex•38m ago
There is some amount of the "Focus follows brain" problem here. What we want is for things to do what we meant, all the time, and in this case it's very possible that the visitor wanted to hear the music. It is not practical (without yet to invented technology) for that to work so we have a substitute - there's a switch and you should remember to press it.

"Focus follows brain" is how everybody wants windowed UIs to work. When I type on the keyboard the letters go where my brain thought they should go - duh, but of course that's unimplementable, so the Windows UI provides "Click to focus" - if I click on a Window the typing goes there until I click another window, meanwhile some Unix systems do "Focus follows Mouse" - if I move the mouse over a Window then my typing goes there even without clicking. Neither is what we actually wanted, both are trying to approximate.

relaxing•34m ago
The phone will still make sound if I launch a music app, why is a web page different?

And I hate web pages making sound! But the UX is confusing, and it’s changed over the years, seemingly without reason.

Iphones now have a software toggle as well, which may have coincided with the shift from “mute ringer” to “mute (almost) everything” that came with the multifunction button.

onionisafruit•53m ago
I would have expected it to be terrible to listen to, but it was pretty nice.
moosehater•43m ago
Yup, this is essentially what the original concept of the Jungle genre was built around. Chop up the Amen Break, mix the notes(?) around, repeat them as you see fit, and add other samples/vocals around the drum patterns you've created.

A couple favorites from the 90s: https://youtu.be/mL2Bgj-za5k?si=fhXHhNGjA-RZkiD7 https://youtu.be/a5meT63flnM?si=ggvypNCFfUUq3Qxq

robin_reala•50m ago
My personal prize for the most chopped amen goes to Breakage’s Final mix of Equinox’s Acid Rain VIP. https://www.youtube.com/watch?v=LoKlz6_I4vY
bouk•23m ago
Wow I've heard pieces of this but never the full thing, incredible
oybng•43m ago
Automatic chopping has existed for decades, popularised here: https://web.archive.org/web/20051225061044/http://www.cus.ca... https://github.com/mdsp/Livecut See also, dblue Glitch, chrisGlitch, Renoise
bzzzt•12m ago
Yes, and on many samplers too. The linked website looks like a 'lite' version of the slicer on my Elektron Octatrack ;)
evereverever•39m ago
This is bonkers and I love it.
uoaei•35m ago
I need WebGL to play audio on HTML pages now?
empath75•8m ago
Not playing it all the way through at the end is diabolical.