Hachi - euclidean drum machine

Hachi

Euclidean drum machine emulating the TR-808 sound.

hachi

I’ve written this script to learn Lua, SuperCollider and the norns environment.
The sound engine is based on the SC-808 by Yoshinosuke Horiuchi.
I have implemented only my favourite sounds, to keep the GUI in a single norns page.
The sequencer borrows some techniques from playfair euclidean drummer written by @tehn with new features like randomizer and real time recording.
Midi clock parameters and bpm are in the parameters page.
I’ve tried to design an efficient interface, keeping things simple.
I hope you enjoy it.

Requirements

Monome norns

Documentation

k1 shift
k1+k3 clear all (if stopped)
k1+k3 randomize (if started)
k2 start/stop
k3 insert step (if started)
k3 randomize all (if stopped)
e1 instrument select
e2 drum parameter 1
e3 drum parameter 2
e1+k1 pattern rotation
e2+k1 number of pulses
e3+k1 number of steps

Changelog

v2.0
Added pitch parameter for Hi-Hat, pattern rotation and automatic state saving.

Download

67 Likes

Awesome. Thank you. I was hoping someone would build a norns version of sc-808.

2 Likes

Oh, heck yes!!! Thanks for making this.

Niiiiice! I thought someone would tackle this. Glad I was right!

I just want to say that this line warms my heart. I’m just starting to learn Lua, motivated by the Monome ecosystem. It’s lovely and inspiring to see someone to have taken the same path, and to have completed a standalone app as a result.

Will try the machine as soon as I secure a Norns!

3 Likes

Thanks!
@keinexco I’m delighted to see your reply. You definitely have to continue learning lua and start coding your own stuff.

1 Like

much appreciated, as someone who doesn’t have a drum machine at the moment! cute interface too.

having some issues with this one hanging pretty hard and pretty consistently.

I’m on a Fates, rpi 3b+, system 200712

The issue pops up when I set the decay time on the kick to over 75% and the fill to more than 50%. Maiden isn’t giving me anything useful after letting me know that the script is loaded in either the matron or sc tab. Buttons become unresponsive, though knobs still work. ;restart is timing out. If I turn decay down and wait for a while it starts to clear up.

If I set things going and then jump out to the select/system/sleep page, the cpu usage climbs up to around 37% before becoming unresponsive. 3 button restart does not work, sleep> does not work because buttons are unresponsive.

Curious if others are seeing this same issue?

Sounds like SuperCollider creates a new instance of the kick drum for every note, and doesn’t destroy them/free up resources until the sound has faded out completely.

With fast triggers, and a long decay time, notes will stack up until the CPU overloads.

The SuperCollider engine could be rewritten such that there’s only ever one instance of each drum sound, that’s re-triggered, rather than each trigger creating a new instance, while the previous one continues to play.

That way, the CPU load would remain constant, but some clicks might be introduced due to sudden volume changes.

I don’t know if this behaviour will be more or less like the way a real 808 sounds, but I don’t think either really mimics the real response of the original hardware.

The issue pops up when I set the decay time on the kick to over 75% and the fill to more than 50%. Maiden isn’t giving me anything useful after letting me know that the script is loaded in either the matron or sc tab. Buttons become unresponsive, though knobs still work. ;restart is timing out. If I turn decay down and wait for a while it starts to clear up.
I can easily reproduce the issue. Thanks @coreyrt, I'll take a look.
1 Like

Sounds like SuperCollider creates a new instance of the kick drum for every note, and doesn’t destroy them/free up resources until the sound has faded out completely.

@toneburst you are probably right, thanks to point me in the right direction. I think that the behaviour is now very similar to the real 808, but I could be wrong.
I don’t know exactly how to solve the problem…it’s time to learn something new!

1 Like

I did something similar with a drum voice project I was working on a while back. I can try and dig it out later (at work at the moment).

1 Like

Thanks @toneburst i appreciate your help!

Just trying this out. Sounds Really Nice!

Most Euclidean pattern generators I’ve seen have the facility to shift the pattern left/right (with wrapping).

That would be a great addition to your script, I think (unless it’s already there, and I’m missing it).

The realtime recording feature is great!

Thanks to @toneburst suggestions, I’ve made some changes in the engine.
Maybe @coreyr can test if now is working properly.
Let me know!

2 Likes

Much more stable! I can still overload sc a bit if I set the fill of multiple voices too high all at once but its not freezing up and becoming unresponsive. It works very well if I’m using it within reason.

Great script @pangrus! The max decay time on the bass drum is now quite a bit shorter, but if I understand correctly, unmodded 808s don’t have a super long decay time either. Great work around, it sounds fantastic.

Thanks! Now it’s time to think about the pattern rotation (shift) as suggested. Next week, maybe.

Sorry to keep making requests, but state saves/recall would be really cool too

2 Likes

I was going to request this (save state) as well as an option to mute drums.

This is a fun little script, many thanks!

Before going any further, I need to learn something more about supercollider to improve the engine.
Hey, contribution are welcome!

2 Likes