creating trigger from bad sound acoustic bass drum (tricky)

Hi all

I’ve got a woeful sounding acoustic bass drum from over 40 minutes of a live recording. It sounds bad because of poor microphone recording, poorly tuned drums and a bassdrum beater bounce/rattle against the head. There is NO chance to re-record the drums.

the only thing of value is the drummers skill in timing (near-perfect) and his excellent feel (dynamics: loud to soft hits of the drums)

What I’m attempting to do is use the audio of the recorded bass drum to fire a trigger into an Alesis D4 Drum module full of decent sounding drum samples. The aim is to mix the sample in with the acoustic sound to a lesser or (probably) greater degree.

At the moment the idea is working - the trigger is firing the samples in the drum module and the dynamics in the playing is reflected in the level of the sample drum coming out. This is because I’ve already carefully applied a noise gate (Nyquist) to give me the bass drum note and silence inbetween (it also took a bit of manual editing of spill from the occasional loud snare hit).


… looking at the waveform detail, it shows the bouncy beater creating another peak in the trigger a mere few milliseconds after the initial hit (between 8-12 ms to be exact). This is creating a mis-trigger in the drum module … it sounds like a very fast double-bassdrum pedal (but it isn’t 'cos he doesn’t use them, nor play like that).


I’m looking for a way to “tidy up” this trigger (copying the recorded drum track and modifying that to only run the triggered samples) by ignoring/removing everything after (say) the first 6 milliseconds but still keep the level of the initial hit.

I’ve got a few things in my favour - in between each drum hit is silience (thanks to the previous application of the NY noise gate), and the shortest time between successive bass drum hits is 76ms.

So it sounds like a fast-acting noise gate that is triggered by anything louder than silence, only allows the first 6ms of audio, gates the rest (even if it’s louder than the initial hit) and resets after 76ms ready for the next bass drum hit.

I’ve tried the Nyquist noise gate again but can’t seem to get the settings correct to do this - that second peak 8ms after the initial hit restarts the gate when I actually want to chop it off.

Any thoughts?


Steve’s Nyquist noise-gate has one control which sets both attack & decay times.
Other gates have separate attack & decay times. Having a longer decay-time should ignore the second hit.

Thanks for your interest, Trebor.

What I really need is to convert the first part of that waveform into a short pulse… but (and there’s aways a “but”) … I can’t just turn the whole drum hit into a simple square wave of maximin amplitude - I need to keep the dynamics of the playing so the short pulse I end up with will vary with amplitude and that will drive the level of the resulting drum sample from the Alesis D4 drum module.

Actually, Steve’s NY Noise Gate has both settings available under the hood. That’s the gate I’ve already been using getting rid of microphone spill, and it’s done a good job from a musicallity sense.

and is a simple mod to make them available independantly.

I attempted
ATTACK: 0.20ms (yes, 200 microseconds - I went under the hood and adjusted the range)

and even if I go under the hood again and reduced the RELEASE time to, say 2ms, I’ll still have a problem where it will see the next positive swing after 2ms and let that through when I actually want to truncate it. That’s where a “HOLD” setting could come in handy.

OPEN the gate on the initial hit
RELEASE the gate after, say 2ms
HOLD it closed for, say 76ms, ignoring any condition to open it again until that 76ms

I almost need an ADSR envelope applied to each drum hit… hmmm…

I presume that the D4 triggers on the start of the trigger sound, and isn’t too fussy about what the sound is, so long as it has a clean start and sufficient amplitude?

Please post a short sample in WAV format for us to experiment with.

This bit is not useful in this case, but just background information…
“Full featured” noise gates usually have an additional “hold” setting, which is a similar idea to the “S” (sustain) phase of an ADSR envelope. However, that would not help in this case because the “hold” setting tells the noise gate “when the gate is open, keep it open for … seconds after the sound level has dropped below the threshold before beginning the release phase”. In other words, it does the opposite of what you want.

Thanks for having an interest, Steve. Appreciated.

Precicely. The early days of trigger pads just had a DC voltage providing a square wave to act as a pulse. Later pads had that square wave of variange amplitudes to allow different layers of samples to be triggered (a small amplitude triggered one sample, a larger triggered a different sample), in addition to varying the output level depending on the pulse amplitude.

Because I’m working on a copy of the recorded bass drum track, I can totally destroy the waveforms of each bass drum hit, provided I don’t screw up the timing, and keep somewhat close to the amplitude of the initial drum hits (not beat-by-beat, just over many seconds as the feel shifts in different parts of the song)

Working on that now - will come back with it. A JPG of a single offending drum hit will explain it far better than words - it will show the initial transient used to open the gate (and provide the initial sample trigger) followed by another trasient a few milliseconds later (sometimes just as high in amplitude, if not higher) that’s causing the offending/unwanted re-trigger.

I’m thinking back to the analogue synth days where the “S” in ADSR is “Sustain Level”, which in my case would be silence - after the initial decay, have no level until the 76ms Release time has finished.

I’m having my doubts a Gate is the correct tool for this - to truncate a waveform to only a couple of milliseconds after the initial attack - but I can’t think of what tool could do the job.

How about half-wave rectifying, then differentiating, then equalizing,
so the leading-edge produces a higher peak than the briefer transient which follows …
differentiate using 'slope'.gif

“Sample and hold” can eliminate the second hit.

Thanks for your input, Trebor, but it - unless I’m wrong - it looks like I’d lose the dynamics of each drum hit. It’d just be a square wave of 100% amplitude, it wouldn’t cater for quieter passages within the music.

Interesting idea. I’m familiar with S&H (or “follow and hold”) from analogue synth days… but unsure how to apply it here.

I’ve attached some file here

Screenshot of a couple of kick drum hits
A zoomed in single kick drum hit
drum_kick_test.WAV as the source acoustic drum
sample_kick_test.WAV is the samples triggered by the recorded acoustic drum

There is a delay in the sample. This is because the signal chain is

  • out of Audacity in Overdub mode - into my mixer
  • out through mixer aux send - into Alesis D4
  • Out of Alesis D4 - into TASCAM A/D converter
  • Out of A/D converter back into Audacity in Overdub mode.

I’m working on the theory that the delay in the sample will be consistent and can be corrected by truncating the track the offset it is delayed.

I hope all this make sense

Thanks for the suggestions, everyone. Appreciated.

I’ve never done anything like this, but…

I assume you have a multitrack recording? It seems like the “simplest thing” would to “play” the synthesizer. You’d be done in 40 minutes (well, maybe a little longer if you don’t get it perfect the 1st time).

There is a drum-replacement program called [u]DRUMAGOG[/u].

Or with a DAW, you could simply program a new kick-drum (after time-aligning the existing recording to the grid).

Yes, each part of the drumkit, in fact, every instrument of the live event has been reduced to it’s individual WAV file, all starting from the same point.

However, I’m unsure what you mean by ’ “play” the synthesizer’ - the Alesis D4 is a drum module - just full of samples of drum kits. It’s biggest claim to fame is that it takes up to 12 triggers to fire a separate drum in each kit. Perfect for using with electronic pads as triggers, tricky - but possible - using microphones, and a P.I.T.A using a recording of live drums.

On first glance it looks similar to what I’m trying to use. The difference is I’m trying to do it with the tools I have available.

I’m not using a DAW for mix, I’ll be using a TASCAM product … AFTER … each WAV file is as good as I can get it using Audacity. Besides, this was recorded live. There is no click track, there is no “Exact” timing. This is a recording of real people playing real instuments.

Those ‘double hits’ where the second hit is louder than the initial hit are likely to be a problem whatever we do.
Even with a ‘sample and hold’, the initial hit will be sampled (and held), then the signal will step up to the level of the second hit.

Here’s some code for you to experiment with:

(setf hold 0.05) ;seconds

(let ((block (truncate (* hold *sound-srate*)))
      (step (truncate (* hold 0.25 *sound-srate*))))
  (sim (s-rest 1)
    (at-abs hold
      (cue (snd-avg *track* block step op-peak)))))

As you can see, it’s based around the SND-AVG function which is documented here:
Increasing the ‘step’ size will tend to smooth the waveform. When ‘step = block’ the waveform will ramp up and down.
‘Step’ may be decreased as low as 1 sample, but the effect then becomes extremely slow.
As you might expect, ‘hold’ is the duration (in seconds) that the peak level is held.

This pattern is consistent …
Use biiggest peak as trigger, then time-shift -20ms (if you must).png
So you could set the threshold to use the largest peak as the trigger, then time-shift the track backwards by 20ms.
[ I don’t think you’ll actually notice a difference after 20ms time-shift ].

Differentiating using “slope” also creates the biggest peak where you want it, without having to time-shift …

(multichan-expand #'slope *track*)

differentiation (using 'slope') also creates the biggest peak where you want it.gif
but that method is unnecessarily complex.

I’ll try a bit of experimentation with these ideas but in the meantime I’ve had a thought along a different line…

All complex waveforms are simply multiple sine waves interacting in and out of phase with each other. For a drum that’s very obvious as the drum skin has it’s initial movement and then has interference patterns of the movement of the skin causing the overtones.

I tried a steep HPF at 4kHz to see if the “clack” of the beater hitting the skin could give me something clean… maybe I should try a very LPF to get rid of 2nd and 3rd harmonics?

Just thinking out loud…