Follow

fuck it, I'm releasing my databending drum machine TONIGHT

make drum loops with percussive samples procedurally generated from opus codec glitches!~ 🥁💥💻

suricrasia.online/opus-databen

I completely forgot the showcase the save and load feature.

basically, you can save a drum pattern to a string and load it later, or share it

here's an example:

["bovine",43,90,[[37,321,0],[17,4096,5],[15,1028,0],[14,4112,0],[77,1072,0]],[[-1,-63,0],[70,-29,0],[60,-62,9]]]

here's another I just made:

["soupstore",0,120,[[44,257,0],[60,4112,0],[61,64,10],[44,4,3],[84,4112,0,1],[86,64,0]],[[-1,0,0],[62,-25,0],[82,-61,49],[83,-14,95]]]

["pemis",73,120,[[60,256,4],[63,16,4],[67,1,13],[76,64,4],[79,4096,4],[79,1024,7],[60,4,2],[98,224,11],[1,1,2],[52,1792,11],[43,16,11],[63,28672,11],[73,1,7]],[[-1,12,0],[46,-22,3]]]

@SuricrasiaOnline

You know, these are short enough strings that you easily encode them in a URL, especially compressed and base64-encoded. That would let people create direct links to their beats with no server-side storage.

(I did that with moo.party and it seemed to work fine.)

@SuricrasiaOnline

This is *so* cool!

["blortf",99,125,[[81,257,0],[85,16,0],[99,20480,0]],[[-1,0,0]]]

@SuricrasiaOnline god i wanna know how this works. like i wont understand any of it but i would still watch like a ~20 minute video explaining it nontheless

@SuricrasiaOnline I fucking love this, this is so much fun!

I came up with this and I love it: [“dance”,66,118,[[1,17,0],[26,768,5],[66,4096,1]],[[-1,-28,0],[83,6,2],[66,8,90]]]

@matthew woah this is awesome, sounds like trailer music for a horror movie

@SuricrasiaOnline neat

[["lppg","nufis","ummp","foof"],41,101,[[142,256,7],[242,16,0],[42,4100,8],[345,65,8],[345,1,7],[41,1024,8]],[[-1,-44,0],[345,55,0],[42,-75,33]]]

@SuricrasiaOnline one more

[["human","trans","rights","are"],18,120,[[147,5120,9],[201,112,0],[306,1024,5],[18,4096,0],[243,1,0]],[[-1,8,0],[243,-13,0],[18,-70,44]]]

@SuricrasiaOnline Nice! Here's what I made:

[["Wooha","reed","niq","helloowo","Whaa"],29,100,[[145,256,5],[284,4353,10],[320,16,5],[446,5,7],[447,16,7],[448,256,7],[445,4096,7],[496,4096,0],[98,16,0],[29,257,0]],[[-1,0,0]]]

@SuricrasiaOnline coffee cup coffee cup

[["bryant","gundam","obsequious","women"],17,140,[[128,4369,12],[136,4369,3],[211,33825,10],[212,1,5],[313,10308,3],[314,4100,10],[317,2080,10],[318,10240,9],[17,49152,7]],[[-1,0,0]]]

@SuricrasiaOnline crunchy :blobnomcookie:

[["instrument","opus","databending","drumkit"],21,120,[[100,4096,5],[221,1,0],[354,257,0],[2,320,10],[18,20480,10],[21,1,7]],[[-1,0,0]]]

@SuricrasiaOnline I have already made a ripoff of the intro to Blue Monday, this thing rules

@SuricrasiaOnline holy shit this is cool

The preset: [["lesbian","trans","gay"],99,115,[[132,16384,0],[133,4096,5],[173,256,0],[101,1025,0],[221,256,0],[221,256,0],[230,257,0],[240,4096,10],[240,64,0],[241,20,7],[101,0,7],[251,256,0],[173,64,7],[285,4112,0],[285,1024,5],[1,256,7],[7,17408,10],[7,68,5],[22,16,0],[22,64,7],[60,257,0],[65,257,0],[68,4160,0],[99,257,0],[99,257,0],[68,92,7]],[[-1,0,0]]]

With a couple of hours fucking around:

@SuricrasiaOnline shared with my musician friend, definitely wanna pass on the good vibes. They seemed to quickly slap something together and found it fun to use!! :aBobDance2:

music stuff 

@SuricrasiaOnline ["cat",73,90,[[1,21845,0],[2,4240,0],[0,4096,7],[3,43690,0],[7,129,0],[19,2324,0],[18,64,0],[22,257,0],[23,9216,5],[32,4369,0]],[[-1,0,20]]]

Made a bit of a jam out of it, not very good but it's something

music stuff 

@maris @SuricrasiaOnline I like it, and it has cat in it! 😁

@SuricrasiaOnline That’s really cool. [["89","MAMOTH","BUN","GAZ","METH","BEER","VOL","GAYA"],42,105,[[142,4624,11],[242,577,11],[342,260,8],[442,61717,7],[542,4096,0],[642,257,10],[742,336,5]],[[-1,20,0]]]

@SuricrasiaOnline is it possible to load the libopus.wasm from a local file, so one could use the drum machine while offline?

@tethre unfortunately you will probably need to host a local server to use it offline (I use `python -m http.server`)

@SuricrasiaOnline That is done only in Javascript? Or is there Pure Data behind or so? Is there a code repository?

@PatchNotes @PureData

@jayrope It was originally going to be entirely javascript, but I noticed that different web browsers decoded opus packets slightly differently, so I rewrote it using a webassembly opus decoder

@SuricrasiaOnline Interesting. I am a musician, more than a coder. That level of JS is too complex for me. But i have a few very simple feature suggestions to make this musically more usable/interesting :) You'll tell me, if you need this. And: well done. Works like a charme.

P.S.: Your BPM shows/is the actual tempo divided by 2 atm. Displayed 16ths are in fact 32nds.

Sign in to participate in the conversation
Cybrespace

cybrespace: the social hub of the information superhighway jack in to the mastodon fediverse today and surf the dataflow through our cybrepunk, slightly glitchy web portal support us on patreon or liberapay!