120 comments

[ 2.9 ms ] story [ 173 ms ] thread
Looks great and works great! A reset button would be nice to undo the horrible mess I made.

A minor note, when I load the page I get console warnings about an Audio Context being prevented from starting automatically, but once I click play everything works perfectly fine.

> A reset button

And 'random' button too.

Oh yeah, adding to my to-do list!
If you're willing to go a bit further, i recommend adding a "groove" cursor, that slightly shift each box within the beat, at random (then you can have more complex algorithm to make the randomisation move the beat toward a ternary rythm instead of completely at random). It's called "humanize" in some audio software and can be fun (if you feel like putting one cursor per track, that's even better).
The audio context thing where it won’t start without user interaction is by webaudio API design. OP would need to prevent the errors from coming up though.
> A reset button would be nice to undo the horrible mess I made.

The (...) button next to "Your jam" -> Clear does the job for me

Good stuff!

Are you planning to open source it?

Yes, it makes a lot of sense to open source it — will do in a day or two!
nice, the banana tapping to the bpm was a nice touch

https://peel.fm/1dd2e8a

Fantastic, had a lot of fun poking around this little machine.

I really love it, here are some minor improvement points:

- when right-clicking, the intended functionality of selecting the appropriate rhythm works only half the time or so. The other half is the browser modal showing normal right-click action. Consider doing long-press to change rhythm?

- volume per channel feels off. Putting the slider halfway already results in nearly inaudible contribution from that sample. Consider changing the "slope" of the volume slider?

- the BPM slider is a bit on the small side. Consider making it wider for finer control?

- the window at default zoom level (100%, 1080p resolution) doesn't fill the screen. Works perfect on 125% setting. Consider filling the entire screen so that the button sizes etc. are maximized?

Amazing to play around with.

That's awesome to hear, and thanks so much for the detailed feedback. Really appreciate it!
AH! yeah in my chrome it didn't work at all. i was super confused how the example got the little dots and what they meant.
I would also suggest a 'Solo' button
Also having tons of fun with this

Some more feedback:

- The blue indicator is 4 ticks behind the playback

- It would be nice to have more options for where the sounds can appear, like bars 3 and 4

- When I enable a track, I expect any notes that have already passed to have been skipped, but some (kick, cymbal) will start playing halfway through the track even after the note has long passed.

As someone who was into making electronic music back before Fruity Loops and Hammerhead—-a time when one coveted actual hardware, but was always searching and dreaming about software drum machines because they were cheaper or free, I always find it amazing that we can do this in the browser. I always love seeing cool projects like this come about.
Hammerhead now that’s a name I haven’t heard in a long time… since my teens. Just googled it and there’s an mobile app! https://ruismaker.com/hammerhead/
Yeah Bram Bos is one of the best iOS music app developers out there :)
Same. My first drum machine was a broken Roland TR-909 that I bought from a pawn shop around '88. I borrowed a bunch of my mother's old records, and was on my way to hip-hop-producer stardom! LOL
I second this and thank you heartily for reminding me of hammerhead. These dreams are very familiar!
Have you ever come across https://audiotool.com ?

It's a free, fully fledged DAW in the browser, they emulate the most iconic Roland devices like the 808, 909 and 303

How did I never come across this! What an achievement, there goes my evening.
Awesome job! I've bookmarked it for future use, can't wait to fill the time before meetings start to jam out!
Nice job! A few suggestions: volume control per note (possibly a popup to avoid slider clutter) and the ability to add additional patterns and then sequence them with copy/paste between patterns so you don't have to recreate each one from scratch.
Makes a ton of sense — will add to my list!
Woah, I made almost the same thing the other week https://beatmaker.adammenz.com/ https://github.com/patchorang/drummachine
Huh! I love how you can switch between instruments on each track, that's a great idea.

Have you tried Tone.js vs Howler? Any thoughts?

Interesting, I didn't come across Tone.js until now. It looks like it handles a few more things than Howler. Most useful for the drum machine would be scheduling. I'm just using setInterval, which isn't guaranteed to be accurate, but seems good enough for my use case.

I want to build some other browser based audio/synth tools. I'll have dig into Tone.js more for one of those, thanks. I'm re-learning to code with these projects, but the goal is to build a multiplayer web-based modular synth.

Yooo... MY PEOPLE!!!

I am working on building a web based modular synth I can sequence with/use to sequence my real life modular synth.

I want to be able to live stream my real life synth patches and allow people to mess with some CV paramaters in the browser.

Where can I follow your work?

Very cool, here's my loop :) https://peel.fm/f3148e6

Now we need more instruments and collab editing and you have fruity loops online :)

You should take a look at https://sequencer.party

Collaborative real-time audio/video/midi platform that supports VST-like web plugins (the WebAudio Module 2, or WAM2, standard)

How to get to the second bar?
Can’t get audio to work on iPad (could be human error).

Beautiful and simple interface, dark mode would be cool. Appreciate you making this and sharing, thanks.

Thank you! I noticed on my iPhone that if it's on silent, the audio doesn't play — that could be it.
I can confirm this. It’s definitely not expected! I turned my audio volume all the way up and heard nothing. I shouldn’t need to turn on my phone ringer (and wouldn’t ever think to do so!) to hear a drum machine on a website.
Cute and fun! The toe-tapping banana is a nice touch.

A minor suggestion for your export format is to switch from an "array of structs" to a "struct of arrays" layout:

For example, change this:

    "steps": [{"isOn":true, "repeat":"1:2"}, {"isOn":false}, {"isOn":false}, {"isOn":false}, ...]
To this:

    "steps": {"repeat": ["1:2",null,null,null,...], "isOn":[true,false,false,false,...]}

It's not necessarily more compact, but you can iterate over all of the collections with a single index.
It's really cool that I place the dots just randomly, and the rythm still sounds good.
Lo and Hi tom samples seem to be switched?
the banana tapping its foot to the beat is a nice touch.
Very nice! I love a good drum sampler and this was fun to play with.
Here is my loop :-) https://peel.fm/e431e31
How big are the patterns?

Looks like the author implemented a server-side storage with tiny hash. Why not the data itself as base64? That would make it real serverless!

That's a good point! I did consider this but decided against it since the share URLs would be pretty long.

Instead I went with a S3 based storage solution — still pretty simple, not managing any servers or databases manually.

Thanks! I may be biased but I like Unix composability principles :)

Unless you plan to forever update your credit card on AWS, it can be better to develop without cloud and use one or more url shorteners to share (socials do it anyway).

Very nice! I like the idea that allows you to make notes skip certain bars, keeps the UI compact instead of having to show all the bars.

It would be nice if you could place notes while dragging the mouse instead of having to click all the time, and a clear button would also be cool.

A little detroit techno vibe? https://peel.fm/15f0762

This is really neat! the kick some sweet distortion when you put an accent on it and have it layered with some other samples.

I've been using the Volca Drum recently and an idea from that which I imagine would be relatively simple to add to this would be a divide step option - allowing for double-time hats and the like. It would make a great addition to this fun little drum machine.

(comment deleted)
Fun tool, love how the banana peel logo stars to foot tap soon as the track's playing
here is a quick sketch: https://peel.fm/b02789c variation https://peel.fm/e854bbc

Super clean and fun, thanks for sharing!

One request would be to raise the max tempo so half time could be programmed allowing 32 steps per bar.

oh, and maybe a "song" playlist which allowed you to paste multiple links in a list?