PreSonus Blog

Dynamics Processing for MIDI Velocity

By Craig Anderton

Sure, you can follow your virtual instrument with an audio compressor. But there’s a problem: an instrument’s dynamics and expressiveness depend on the notes’ velocities—not just the audio output. Velocity triggers different samples, alters filter settings, affects envelopes, and much more. An audio compressor can’t compress velocity. So, audio compression can help tame audio levels, but it can’t enhance an instrument’s expressiveness.

Fortunately, there’s an easy way to apply dynamics processing to MIDI velocity. The principle is the same as audio compression: Set a threshold, choose a ratio, and finally, add makeup “gain.”

Fig. 1 shows MIDI velocities from 1 to 127. Of course, this wouldn’t be a real part, but it’s the easiest way to show how MIDI compression affects velocities. Let’s set a threshold at MIDI velocity 80, and compress above that with a 2:1 ratio. Note where velocity 80 is in fig. 1.

Figure 1: MIDI velocities from 1 to 127. We want to set the velocity compressor’s threshold to 80.

Select all the velocities above the threshold for processing (fig. 2).

Figure 2: Velocities above the “threshold” are selected.

To compress the selected velocities by 2:1, choose Action > Velocity and multiply by 0.5. This is the same as a 2:1 ratio in an audio compressor (fig. 3).

Figure 3: Velocities above the threshold are compressed by 2:1. Note how the slope is less steep.

Next, drag the selected velocity values up so that the compressed velocities line up with the velocities below the threshold. Because the velocities are still selected, you can just click on the left-most selected value, and then drag it up to its original velocity value of 80 (fig. 4). Now there’s a smooth transition at the threshold.

Figure 4: The compressed velocities pick up where the unprocessed velocities leave off.

Adding  “makeup gain” is easy. The simplest option is to select all the velocities, and drag upward. Or, select all the velocities and choose Action > Add to add a constant. For example, after compression, the highest velocity is 103. So, adding 24 will raise all the velocities, with the highest one at 127 (fig. 5).

Figure 5: Like an audio compressor, the lower levels have been brought up, and the peaks have been reduced.

This is just one of the ways you can process MIDI velocity dynamics. You can also do expansion, limiting, and gating. If you’re interested in these types of processing as well, drop a note in the comments below.

Of course, you may want to compress the audio output as well. But in many cases, applying dynamics processing to an instrument’s MIDI data will give more expressive results than you can obtain with audio compression alone.