Hacker News new | ask | show | jobs
by leviathant 3573 days ago
I can't give you 'realistic' drum sounds, but I was working on an approximate recreation of a Roland analog drum machine using only Javascript. I got the sound engine down more or less, but kind of fell off the rails when I moved away from my earlier, crappier sequencer and started using a framework.

The sounds should work across browsers when you're manually playing (use the bottom row of your keyboard) but when sequenced playback happens, things get weird. Chrome more accurately reproduces the sounds as I'm imagining them.

Grab the whole thing at https://github.com/leviathant/BossDR110/tree/feature/synthes... or just play around with it yourself at http://bitrotten.com/dr110/webaudio/

1 comments

Looking at the source, yours appears to be sample based too. I think the GP was interested in an oscillator based sound engine.
These appear to be the synthesized versions:

https://github.com/leviathant/BossDR110/blob/feature/synthes...

To the parent, what did you use as the reference for the synthesis patches and parameters? I wouldn't mind trying something similar in ChucK.

My Boss DR-110, a probe, and oscilloscope software - Visual Analyser 2011. You can short the different individual oscillators to ground, and they'll come out the audio & headphone jack.

There's a great breakdown of how the circuitry works at http://www.sdiy.org/richardc64/new_drums/dr110/dr110a1.html - but some of the frequency values there (related to the cymbals) didn't sound right to me - though it's possible I misinterpreted what's going on at that page.

Thanks!

I added a sample-based ChucK class with examples here https://github.com/heuermh/lick/commit/be60769ae32ca955b35b9....

I'll dig into the docs you linked to and see if I can come up with a synthesized version as well!

I started out with a sample-based version in 2011 or so, but the link I posted uses synthesized sounds, in updates I made last year. Have a closer look at the javascript as referenced in index.html and take a look at dr110_synth.js

This is probably most evident if you play a roll on the snare or the handclap. A free-running LFO on the noise sources for these instruments prevents "machine-gunning" like you get when you roll a sample.