Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: I built a little online drum machine using 808 style samples (peel.fm)
353 points by berkcebi on Feb 14, 2023 | hide | past | favorite | 112 comments



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.


>Volume slider

This is a common mistake [0], even popular applications like the Netflix player get it wrong

[0] https://www.dr-lex.be/info-stuff/volumecontrols.html


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.


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


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.


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.


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!


Here is my loop :-) https://peel.fm/e431e31


Added more cowbells as a joke, but it actually worked well

https://peel.fm/65bade0


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).


Well, now I know where the funky thread is!

https://peel.fm/a413ced


created an HN account to contribute to the funk. https://peel.fm/464063a


I dig this one ;)


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.


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.

https://io808.com

https://roland50.studio

https://drumbit.app

https://www.onemotion.com/drum-machine/

https://hiphopmakers.com/best-free-drum-machine-online


Great suggestions, thanks so much. I definitely want to keep the app simple UI-wise, so it's going to be a challenge!


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)


Nice loop!

Just moving the cowbell creates another interesting rhythm: https://peel.fm/bc80cbc

Edit: Correct link


That’s the same loop


Yes, I fixed the link, thanks!


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?


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.


Nice! Talking about detroit and 808:

https://youtu.be/R6pTNuBSqhw

(the producer is from detroit, the track name is not)


Oof, so very dusty! Lovely track, thanks for the recommendation.


yw! i could talk about D producers all day


nice, the banana tapping to the bpm was a nice touch

https://peel.fm/1dd2e8a


https://peel.fm/ad54081 - my creation

/random

Banana is underrepresented contributor to technological growth.

See also https://www.converttobananas.com/



Only bc it’s Valentine's Day :)

https://peel.fm/33e538b

Nice work, fun and the repeats system is cool


thats a good groove you got there. I built off of it. What do you think?

https://peel.fm/6a78420


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.


I agree. I would like it in Ableton


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".

https://www.bitwig.com/userguide/latest/operators/


Fun. Always love playing with toys like this. A little d'n'b loop: https://peel.fm/c275e61

The banana tapping in rhythm is a great little touch. Fruity!


Nice amen break-ish loop.

Here’s a house one. https://peel.fm/abe44a8


good one!


168 bpm :)




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.


https://peel.fm/0eeddb0

I'm having too much fun with this. Thanks!


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

https://teenage.engineering/products/po



Nice job! and thanks for sharing..

Here are some suggestions / wishes:

- 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.

Do you make music yourself?


This is really fun! Thanks for sharing. I'm going to sample my loop into my sp404 and add some effects https://peel.fm/356c797


Thats a really good one


https://peel.fm/5a69bff

Really fun to drop the kick & cowbell for a few bars then bring them back in.


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?


I made three so far!

1: https://peel.fm/1e0025f (from my phone)

2: https://peel.fm/ecafb25

3: https://peel.fm/1bfd07f

Fun way to take a 10-minute break in the middle of the day.


Great! Here's my try https://peel.fm/53fa418


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


Mambo? Super intuitive interface!

https://peel.fm/23ffd9c


Awesome job! I've bookmarked it for future use, can't wait to fill the time before meetings start to jam out!


Thank you for making this!!!

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.

Here is my composition.

https://peel.fm/68acc69


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.


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!


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 would be nice to undo the horrible mess I made.

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


Ah, I missed that :)


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

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).


Or follow the swing recipe from "Roger Linn on Swing, Groove and the Magic of the MPC's Timing (2013)":

https://www.attackmagazine.com/features/interview/roger-linn...

as previously discussed on HN (https://news.ycombinator.com/item?id=34425861).


Great job! Projects like these were what fascinated me with front-end web development in the first place. :)

https://peel.fm/12e9f28


Love the small detail of the banana tapping, when the song is playing.


Would love to have more bars available! anyway here's what I made https://peel.fm/01bdaea


At half speed you can fit two bars (at eighth-note resolution): https://peel.fm/e4b8d7c


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.


Oh man this is soo cool

https://peel.fm/c33c29a


I had way too much fun with this during my backlog refinement meeting. Amazing project, well done!


Love it. Hope you add more samples :)


It's really cool that I place the dots just randomly, and the rythm still sounds good.


Fun tool, love how the banana peel logo stars to foot tap soon as the track's playing


There’s some sub bass in the kick, don’t miss out by listening on phone speakers


Nice idea but this is terrible to use on mobile, the buttons are tiny.

Tested on Chrome and Firefox for Android, identically awful on both.

An example of a smooth and beautiful mobile experience for this sort of thing: https://tones.fm - synth not drums, same principle though.


Right, it's not optimized for mobile at all — definitely on the to-do list.


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!


Yes, please open source


Very nice! I love a good drum sampler and this was fun to play with.


the banana tapping its foot to the beat is a nice touch.


Your "Rim Shot" sounds like a sidestick.


And it needs more contrast



Lo and Hi tom samples seem to be switched?


wow this was fun

i would suggest adding more rings and tunes, and maybe an equlizer to make more complex beats


How to get to the second bar?


Can we chain multiple loops?


This is awesome.


dang! Very nice!


The "official" Roland browser-based 808: https://roland50.studio/ along with the rest of the "classic" Roland instruments.

Nice that this version allows saving/sharing.


In the Air Tonight: https://peel.fm/985d7e0



:-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: