top | item 8568454

Euclidean Drum Machine

77 points| marcw | 11 years ago |groovemechanics.com | reply

23 comments

order
[+] pistle|11 years ago|reply
My patch...

var patch = [ {steps:11,pulses:4,offset:0}, {steps:7,pulses:1,offset:8}, {steps:5,pulses:2,offset:0}, {steps:3,pulses:1,offset:0}, {steps:1,pulses:16,offset:0}, ]; patch.forEach(function(hit,index){ index = index + 1; $('.space-'+index).val(hit.steps).trigger('change'); $('.fill-'+index).val(hit.pulses).trigger('change'); $('.offset-'+index).val(hit.offset).trigger('change'); });

just drop that into your F12 tools' watch window and we can share configs/patches

[+] pistle|11 years ago|reply
Double-bass metal

var patch = [ {steps:11,pulses:13,offset:2}, {steps:8,pulses:2,offset:6}, {steps:5,pulses:7,offset:4}, {steps:1,pulses:3,offset:1}, {steps:15,pulses:8,offset:8}, ]; patch.forEach(function(hit,index){ index = index + 1; $('.space-'+index).val(hit.steps).trigger('change'); $('.pulses-'+index).val(hit.pulses).trigger('change'); $('.offset-'+index).val(hit.offset).trigger('change'); });

[+] dpflan|11 years ago|reply
The top level site (http://www.groovemechanics.com/) has some other cool instruments like a virtual analog sequencer and synthesizer. It would be awesome to be able to use multiple instruments at once in an integrated session - who doesn't want to be a JS-plug-in one-man-band?
[+] tcfunk|11 years ago|reply
Warning for all those with headphones on:

If you navigate to a different tab, and then come back to groovemechanics.com, the sound pops in VERY LOUDLY...it was painful and a bit scary to my eardrums.

Other than that, though, this is really cool!

[+] hartzler|11 years ago|reply
I did not heed this warning. It is VERY LOUD! Heart attack loud :)
[+] genericacct|11 years ago|reply
Holy coolness, can you make a version that runs in node-webkit so I can hook it up to ableton and other DAWs via OSC? That would be 100% groovy. Do you mind if i do it myself some time?
[+] marcw|11 years ago|reply
Thanks! Yeah, I plan to open-source the project. So of course that would be great to port it node-webkit.
[+] pistle|11 years ago|reply
Ooo a MAX midi out plug-in that could fire off notes in a drum rack
[+] kaoD|11 years ago|reply
Suggestion: a random button.
[+] pistle|11 years ago|reply
(function(){ for(var i=1;i<6;i++){ $('.space-'+i).val(Math.floor((Math.random() * 16) + 1)).trigger('change'); $('.fill-'+i).val(Math.floor((Math.random() * 16) + 1)).trigger('change'); $('.offset-'+i).val(Math.floor((Math.random() * 8) + 1)).trigger('change'); } })()
[+] frankydp|11 years ago|reply
Suggestion. Update the url hash with the settings so you can share links.
[+] pavel_lishin|11 years ago|reply
I don't understand why and how it periodically resets.
[+] crucialfelix|11 years ago|reply
its an algorithm that's been popular in music programming the past several years. there are a bunch of implementations of it.

its a method for evenly distributing x pulses along a grid of y steps.

4 / 16 is house kick 5 / 16 is a dancehall beat

start by setting all steps to 16 (the grid size), offset to 0 and vary the pulse setting and you will hear how they are distributed along the steps.

good simple explanation with python implementation:

https://github.com/brianhouse/bjorklund

javascript:

http://blog.fader.co.uk/post/11519018856/bjorklund-algorithm...

I usually call it bjorklund.

I once used it to evenly distribute promoted content across slots on a website.

[+] Chinjut|11 years ago|reply
Are you referring to the adjustable reset counter in the bottom right (which by default resets every 32 steps)? I wish the option were available to disable it and simply have the rhythm reset at its natural period. Alas...
[+] kmm|11 years ago|reply
If the least common multiple of two elements is high, the rhythm would have a very long period, which doesn't sound very well. Three elements of periods 16,9 and 7 would have a period of 1008 steps, which at a tempo of 100 would take 10 seconds to reset. That's not a rhythm, that's a tune.