Modal Signal Processing and Drum Fixing

In this article, we will briefly discuss modal signal processing, and show how we can use ideas from the modal approach to “fix” drum sounds.

This article can also be read as a Juypter Notebook.

Modal Signal Processing

In signal processing, it is often useful to describe a system by looking at the “modes” or resonant frequencies of the system. Modes are well known in the field of room acoustics, where any set of parallel walls will create a mode at the frequency corresponding to the distance between the walls. However, many systems can be described by their modal characteristics, including bells, cymbals, even rocket nozzles.

While there is a lot of physics that describes why certain objects have their specific modal characteristics, in signal processing we can often get by with simply measuring the modes and resynthesizing them. In order to do this, we need to find three parameters for each mode.

  • Mode frequency
  • Mode amplitude (and phase if you like)
  • Mode decay rate

For example, if I have a bell with a fundamental frequency of 200 Hz, the first mode frequency will most likely be at 200 Hz. The amplitude of the mode is essentially the volume at which the first mode rings relative to how hard it is hit. The decay rate describes how long the bell rings out at that frequency. In bells, the higher frequency modes decay very quickly, while the lower modes ring out for a long time.

Drum Ringing

Now how does modal signal processing relate to drums? Drums can be synthesized using modal synthesis, but what about using modal ideas to improve the timbre of an existing drum recording? Let’s examine a snare drum recording taken from freesound.com.

Note that the snare drum seems to ring out for a very long time somewhere around 1200 Hz. Listening to the audio file, confirms this: the snare has a nasty high “ring” that I don’t find particularly pleasing. If I was a mixing engineer tasked with mixing this snare drum into a song, I would probably try using an EQ to make the snare sound quieter around these problematic frequencies.

As you can see it takes a pretty drastic EQ to get the 1200 Hz mode to decay in a reasonable amount of time (relative to the rest of the drum sound), and using this much EQ kind of ruins the attack of the drum sound since it leaves a hole in the frequency spectrum.

Modal Processing for Drums

But what if we look at this drum ringing problem through the lens of modal signal processing? Essentially, the problem is that the drum has a mode at 1200 Hz with too long of a decay rate. Unfortunately standard EQ can only change the amplitude of this mode, not the decay rate.

A couple months ago, my colleague Mark came up with a brilliantly simple solution to this problem. Why not use modal analysis to determine the decay rate of the ringing mode? Then you could implement an EQ filter with a dynamically changing gain that could adjust the decay rate of the mode to achieve some desired decay time. In other words, when the drum is struck, the filter won’t affect the signal at all, but as the signal progresses, the filter will gradually damp more of the signal so as to supress the ringing.

Let’s see how it works! First let’s find the decay time of our problem mode. We can do this by filtering our signal around the mode frequency, measuring the envelope of the signal, and finding the slope of the decay. A convenient way to measure decay time is often using T60, or the time it takes for the signal to decay 60 Decibels.

So now that we’ve determined the T60 of the problematic mode to be ~1.5 seconds. Let’s pick a desired decay time, say 0.5 seconds. Now as discussed above, let’s say we want to apply a time-varying filter to the signal that can create this change in T60. What should the the trajectory of the filter gain look like? I won’t go through all the math here, but essentially, you find a gain envelope that corresponds to each T60 time, and divide them. When we apply the time-varying filter to our signal, here is the result:

From looking at these spectrograms we can see that the ringing frequencies have been damped pretty succesfully, without affecting the attack of the drum too much. From fine-tuning the filter frequency, bandwidth, and desired decay time, it is possible to obtain an even better result.

Implementation

To make this tool available to mixing engineers and producers I’ve built this algorithm into an audio plugin (VST/AU), using the JUCE/C++ framework. To see the source code and try it for yourself, check out our GitHub page.

Thanks for reading!

Jatin Chowdhury is a student.