Forums > MaxMSP

[Sharing] Drum trigger (audio) to onset/velocity

Apr 18 2013 | 3:44 pm

Here’s my drum trigger patch that uses just native objects, locks out each trigger (so they don’t trigger each other), does velocity, etc….
With velocity there’s a tiny bit of latency (180 samples), but it’s better than a hardware unit I think.

It’s tuned for ‘on drum’ piezos, so it may not work well with drum mic input, but I’ve not tested that.

I used the DDrum triggers, physically on my drums, but it should work for any similar/piezo/head trigger.

The volume differential bit is based on Peter McCullough’s envelope follower.

-- Pasted Max Patch, click to expand. --

  1. test.wav
Apr 18 2013 | 3:46 pm

Attached is audio from my actual triggers (no eq/gain modification) to test it with.

  1. test.wav
Apr 18 2013 | 8:10 pm

very nice idea, thanks a lot for sharing!

Apr 22 2013 | 12:38 pm

Thanks a lof for sharing. I tried you patch together with your sound file. There is quite a bit of latency/delay between the sound file and the trigger. I would guess about a second. Is this normal or am I doing anything wrong? The delay is also between the audio (sound file) and the numbers appearing in the boxes. Therefore, I don’t think it is related to my soundcard.

Apr 22 2013 | 12:53 pm

There’s something going on. It’s a few ms latency on all the systems I’ve tried.

Are you hearing MIDI piano along with each drum hit?

Apr 22 2013 | 1:49 pm

I do hear MIDI Piano but with 1 sec delay. It is probably specific to my computer (windows 7, 32 bit).

Apr 22 2013 | 2:47 pm

That could be because of the MIDI driver stuff. You said you also get a 1sec delay before you even see numbers too? The rightmost number out of each bit of it should come out pretty much instantly. If not, I’m kind of stumped because all the guts are audio rate. It gets converted into a max message at the very end of the process, but that most definitely shouldn’t take 1 second.

Apr 22 2013 | 6:47 pm

I connected a click~ to your onset_velocity patcher and I got an immediate response. That suggests to me that your patch works perfectly well.

Apr 27 2013 | 11:30 am

This is what I get. It is similar on my Laptop. I have never heard that Midi drivers are an issue. I have an ASIO audio driver with fairly low latency. Again, it is the changing of the numbers in the patch that is delayed and consequently the Midi Output is also delayed.

  1. Attack.mp3
Apr 27 2013 | 12:24 pm

Wow, that’s really slow…. weird that click~ works. Have you tried sending it other audio, or using adc~ input?

Viewing 10 posts - 1 through 10 (of 10 total)

Forums > MaxMSP