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?
- 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/
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
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).
I would highly recommend enabling click and drag to "paint" notes. As it is right now, if I want 16 closed hats, I have to move, click, 16 times. I'd rather drag to paint based on whatever state of the note I start on.
The mutes on the left would be better if they mute the notes, not the sounds. Muting and then enabling can end up playing the tail of some of the longer sounds. This isn't typically how you want this to work. You can always use the volume control if you really want to get that effect.
It would be nice to get some of the tone controls of the real 808, and the swing is pretty important too..... At some point though, I wonder what your goal is since there are so many apps and web versions of X0X style drum machines these days.
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.
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.
I really like the "1st of 2 bars", etc. options. It's a nice UI to make a more complex beat in a smaller space.
It'd be cool if there was some kind of "randomize" function to just make a random beat. Maybe not truly random, just something with the basic drums and maybe within some set of constraints.
Bitwig has this feature for looping clips: "Operators". The recurrence operator, specifically. You can do more complicated stuff like "play this note on the 2nd & 4th loop of a 5 loop cycle".
Awesome, I loved this! I have been using it for my guitar practice.
I'm trying to create the drum track for the starting part of Blue rondo a la turk by Dave Brubeck. Not sure how I can tell you but one quick listen will suffice: https://youtu.be/vKNZqM0d-xo. Can anyone figure out how to program that?
Unfortunately that song is in 9/8 and this drum computer appears to be fixed only in 4/4, you'd need an extra two steps to properly do it in this format really. Or at the very least a way to limit the steps to nine.
It seems this drum machine only can do 4-beat loops (with beats subdivided into 4). Sounds like the Brubeck is in 9/8, subdivided 2-2-2-3, 2-2-2-3, 2-2-2-3, 3-3-3.
Nice! Reminds me of these little Teenage Engineering machines, which have a similar UX but are a the size of a calculator. A lot of fun to mess around with
- Can you add a decay slider to each channel? That shouldn't be hard. It could change the sound & balance of the set by a lot.
- Also panning is very useful..
- The repeat every n bars is a very nice touch. Trig conditions are out of the question i guess.
- A random button would be lots of fun and make users stick around more. It could have a percentage parameter, too. Could be used as a starting template each time you reload or revisit the page.
- The sliders could be a bit wider, especially the one for tempo.
That's cool! I've built something similar some months ago, in Vue.js - If you double click on the pads you'll get a stronger beat, useful for accent.
Please check it out: https://www.fachords.com/drum-machine-tool
Drummer here. Well someone who plays drums, but doesn't play too much these days. This is wonderful and very fun. I now shared this with everyone I know who has children.
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.
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.
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.
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).
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.
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.