A mundane first post... (TR-808 snare emulation)

christripledot's icon

Hello Maxers!

Having recently taken the plunge with Max, I've jumped in at the deep end and started putting together a sample-accurate sequencer (based on [buffer~]s) to be controlled by my Mackie Control. But rather than posting my bug-ridden unfinished opus, I thought I might post something humble but working in the hope that someone could give me a little constructive criticism.

The attached patch is a TR-808 snare drum. It's triggered by a float (0 to 1) that determines amplitude. Audio-rate parameters are tune, tone, snappy, and decay (-1 to +1). While the trigger isn't sample-accurate, I'm happy enough triggering it from an [edge~] and a [snapshot~] for amplitude. The ugly business going on with [curve~] could certainly be improved I'm sure, but I definitely prefer its log. decay compared to [line~].

Audio-rate control is important to me (I have a lot of modular gear that I'd like to incorporate into my patching), but I'm aware that over-reliance on MSP objects will cane my CPU rather quickly. I'm trying to be as economical as I can while still crowbarring in maximum functionality. I'd be extremely grateful if anyone would take the time to check out this patch and see if there are any obvious optimisations that could be made.

Humble thanks in advance,

Max Patch
Copy patch and select New From Clipboard in Max.

chris tripledot

oli larkin's icon

sounds really good. i have a few tips which may or may not be useful:

  • it seems to me that only the trigger really needs to be audio rate and the parameters can be control rate (the opposite of what you have). I think you will probably notice timing problems if you trigger your drum machine with the max scheduler, but for parameter modulation it should be OK. At the moment there are lots of unnecessary signal rate calculations for each parameter.

  • for a signal rate trigger/envelope you can use rampsmooth and start it with an impulse

Max Patch
Copy patch and select New From Clipboard in Max.
  • to make the envelope decay exponentially, you can square the output

oli

---------------------------------------------
http://www.olilarkin.co.uk / http://olilarkin.blogspot.com

christripledot's icon

Hi Oli,

Can I just say I've admired your work for a while?!

Anyway, thanks for the [rampsmooth~] tip, that's fantastic. Helps me out with some other bits too. I'll experiment and see what params really need to be audio rate, but my thinking was that I might want to do weird FM stuff further down the line. We'll see.

I'm really going for authenticity with the sound, and a few little "analogue" quirks (you must have noticed the super-subtle [cycle~] and [noise~] modulation going on. My kick is sounding proper, too, I'll post the full 808 and 909 kit when it's tidied up.

Cheers dude!

chris

oli larkin's icon

I'll post the full 808 and 909 kit when it's tidied up.

looking forward to it. btw, you might like to try eric lyon's el.dmach~ object ( a sample accurate sequencer).

oli

---------------------------------------------
http://www.olilarkin.co.uk / http://olilarkin.blogspot.com