Show HN: Beats, a web-based drum machine

Posted by kinduff 5 days ago

Counter159Comment48OpenOriginal

Hello all!

I've been an avid fan of Pocket Operators by Teenage Engineering since I found out about them. I even own an EP-133 K.O. II today, which I love.

A couple of months ago, Reddit user andiam03 shared a Google Sheet with some drum patterns [1]. I thought it was a very cool way to share and understand beats.

During the weekend I coded a basic version of this app I am sharing today. I iterated over it in my free time, and yesterday I felt like I had a pretty good version to share with y'all.

It's not meant to be a sequencer but rather a way to experiment with beats and basic sounds, save them, and use them in your songs. It also has a sharing feature with a link.

It was built using Tone.js [2], Stimulus [3] and deployed in Render [4] as a static website. I used an LLM to read the Tone.js documentation and generate sounds, since I have no knowledge about sound production, and modified from there.

Anyway, hope you like it! I had a blast building it.

[0]: https://teenage.engineering

[1]: https://docs.google.com/spreadsheets/d/1GMRWxEqcZGdBzJg52soe...

[2]: https://tonejs.github.io

[3]: https://stimulus.hotwired.dev

[4]: http://render.com

Comments

Comment by turbotim 5 days ago

This is nice, I'm similarly a fan of Teenage engineering and have been playing around with ToneJS and Sveltekit to make https://shantylab.com

It's been a really interesting way to understand the elements of putting together music for me. I started off thinking surely it can't be that hard to make a simple way of making music but as I added more and more functionality I found it tricky to keep the UI simple. I'm still plugging away and the challenge of chasing simplicity is what's keeping me going.

Comment by kinduff 5 days ago

Wow! This is amazing! You went great lenghs to make it complete. I really like the layers, something that I would love to add.

Your sounds are very nice too, are you synthesizing them too?

Comment by turbotim 4 days ago

There’s some synth sounds and some samples, you can record your own samples in also and play them like an instrument. That part is loosely based on the KO2 which I have and love

Comment by adrianwaj 5 days ago

Very nice. Would be great to see a "tap bpm" instead of setting numerically, also a way to run offline, and lastly a way to submit drum covers of popular tracks that used say the Linn 9000 and TR-808 drum machines - with those sounds available!

To really make it interesting, have a way to switcheroo the drum tracks of some cloud music to layer in one's own version instead.

Comment by Voltage 5 days ago

Comment by ofrzeta 5 days ago

Well done. It reminded me of Tricky :)

https://www.youtube.com/watch?v=B2xAjxpwFmw

Comment by kinduff 5 days ago

Nice beat! What do you mean by triplets?

Comment by Voltage 5 days ago

https://www.youtube.com/watch?v=wYPY9-yjclo

Squeezing 3 hits (evenly placed) in the time that you'd expect to hit 2 hit.

Comment by bevelwork 5 days ago

trip-o-let trip-o-let

Comment by dworks 5 days ago

Love the UI. I think these browser-based products are great at removing the "mystery" around music making or DJing by making it accessible. All you need to do is type a URL and click a few elements to get started and you get instant feedback. I built a similar browser app but for DJing (I was also inspired by Pocket Operators): https://dj.t-tunes.com/

Comment by lagniappe 5 days ago

Lots of crackling and popping in firefox on macos, pretty cool otherwise

Comment by darkwater 5 days ago

Same here. Also, the current beat highlight is always red and so it's invisible when the content is red as well (i.e. kick by default).

Beside this, very cool!

Comment by exodust 5 days ago

I'm getting a little popping on Firefox Windows, which disappears if I remove the kick step on second row of the default bosa nova. Nice work anyway, the UI is immediate and instant play.

Comment by yellowapple 5 days ago

Same, with Firefox on Linux (via Flatpak). The UI's great, though.

Comment by ofrzeta 5 days ago

No crackling here (Firefox/M4 Air).

Comment by yochem 4 days ago

Really nice, loved playing with it!

One small improvement: could you disable the "double tap to zoom" on mobile browsers? This happens often when you press multiple squares closeby. Should be one line of css:

    touch-action: manipulation

Comment by metalman 5 days ago

heres an offline drum machine, "drum on"

like the online one here as well, but does have static glitches.

https://f-droid.org/en/packages/se.tube42.drum.android/

Comment by skupig 5 days ago

The share button doesn't show up on Firefox for some reason?

Fun stuff! It would be nice to be able to make longer patterns. Maybe by having triggers that play randomly or every nth loop, like a lot of drum machines do.

https://beats.lasagna.pizza/?name=hakkernuse&bpm=141&i0=K100...

Comment by utopiah 5 days ago

Very neat! I had a https://www.crowdsupply.com/wee-noise-makers/wee-noise-maker... but I don't always carry it with me. I do have my phone though most of the time in my pocket so having this on, Web based, is great! The author of ToneJS is very kind, if the documentation wasn't clear you might want to reach out to help clarify it.

PS: didn't check it but being a PWA to work offline would be quite neat, just in case the subway or train goes through a spot without connectivity.

Comment by djmips 5 days ago

Fascinating, first time I've seen an open source project written with ADA.

Comment by ajxs 5 days ago

I like the interface! It's even better than this other interactive drum machine: https://www.youtube.com/watch?v=3yRx-dd7Jcs

Comment by fallinditch 5 days ago

Nice job! Added to my home screen.

Firefox on Android - seems to work perfectly.

Any plans to develop this further? I'm not sure how doable this is but I'd love to be able to program African polyrhythms on my phone.

I think the main dev challenges would be:

- add swing and humanization

- layering the polyrhythms on separate tracks

- adding different time signatures, e.g. 12/8 is common for African polyrhythms.

- allow independent cycle lengths per track

A good resource for further reading - https://djemberhythms.com/books/

Comment by bracketfocus 5 days ago

Nice. I made something similar ~6 years ago, yours is a lot better though.

https://erikburt.github.io/TSequencer/

Comment by fatherwavelet 5 days ago

I have messed around with making a number of different web drum machines but I really like the square step sequencer for something fresh instead of the standard row.

I notice right away how I am focused on the specific sound I am looking at compared to the step row that feels more focused on the pattern overall.

You could also make it so it plays samples for the drums instead of synthesizing them directly but I do like the default sounds too.

Comment by oniony 5 days ago

For something that loops would you not want a circle?

Comment by nilram 5 days ago

Not great waveforms, to my ear. Decent UI for a first cut -- trying it out, I found it really addictive. Makes me want to learn more about beats.

Comment by 999900000999 5 days ago

I absolutely love this as an amateur beat maker.

I want a way to add a chiptune piano with different notes, but this is already awesome!

Comment by igleria 5 days ago

This is great! I can report a bit of odd sounds here and there on firefox ubuntu, but chromium ubuntu works perfect.

Comment by bicepjai 5 days ago

I really enjoyed playing around with this, thanks for sharing. You can tell a lot of care and effort went into the experience. I’m curious: did you use any AI tools while building it or was that all done manually?

Comment by bicepjai 5 days ago

Oh man, I can’t stop using this app. It’s been 2 hours

Comment by chaosprint 5 days ago

cool. for those who are interested, you can actually use code to control the seq like this example in Glicol:

https://glicol.org/demo#minitechno

Comment by hmokiguess 5 days ago

Nice UI but your examples don’t feel right to me. Bossa nova sounds nothing like bossa nova.

Comment by kinduff 5 days ago

I agree, let me see if I can tweak it so it sounds a bit more like it.

Comment by ferg-in-japan 5 days ago

Wow this is cool! Inspiration to try making something like this myself. The 8-bit aesthetic looks great too. It would be cool if users could edit the tones - maybe a way to expand in the future.

Comment by myky22 5 days ago

Love it. The pixel UX reminds my of Roguelite games hehe.

So easy to use. Would love to see some bass lunes in the future.

I normally use my OP-XY when improvising.

Comment by hmcamp 5 days ago

I like it. I think I’ll eventually take a whack at making something similar. Thanks for sharing

Comment by TheCraiggers 5 days ago

The scan line effect is very nice. Not over done like many others are.

Comment by brikym 5 days ago

Nice. I love how you're not using a framework just pure javascript.

Comment by epiccoleman 5 days ago

I see scanlines, I upvote. Simple as.

Comment by cyrusradfar 5 days ago

This made my day. Love this, thank you!

Comment by MintyPyro 5 days ago

Very well made!

Comment by ssoydan 4 days ago

Simple and fun! I love it.

Comment by millzlane 5 days ago

A randomize button would be cool.

Comment by zerr 5 days ago

Nice! What's the UI toolkit?

Comment by kinduff 5 days ago

Custom made, I've been using on some apps lately

Comment by Igor_Wiwi 5 days ago

pls add examples from the Google Sheets for easy bootstrapping

Comment by beratbozkurt0 5 days ago

can we control with keyboard?

Comment by kinduff 5 days ago

I'll make sure to add that!

Comment by juicytip 5 days ago

[dead]