Four Insights about Quantization

Tuesday, August 11, 2015 14:48

Quantization might be one of the most important and often used features during MIDI editing. Everybody uses it and everybody seems to know how to use it. You play a MIDI Track with not-so-perfect timing, then you click the magic Quantize button and the timing is perfect. It''s that simple. Or maybe there is a little more to it. Let me reveal four important insights about Quantization in Logic Pro X.

#1 Quantization adds a Time Position Offset

The first step in understanding Quantization is to know that Logic stores two positions for each MIDI Event.

Original Position

The Original Position of a MIDI Note in a MIDI Region is defined when you do any of the following three things:

  • Record: You record a new MIDI note at a specific position, its Original Position.
  • Create: You create a new MIDI note manually at a specific position, its Original Position.
  • Move: You move an existing MIDI note by manually dragging it to a new position, its new Original Position.

By default, this Original Position is also the Playback Position, the position the MIDI note is played back when the Playhead moves across during playback. So far so good. But now something could happen:

Offset (Quantize)

Logic can automatically move a MIDI note from its Original Position to a different position. It does that when we use the Quantize Command to apply a Quantize value to a note. That Quantize Command, based on its instructions, tells Logic to apply a time offset to the Original Position value (i.e. 19Ticks earlier, 420Ticks later). That means, the Playback Position is now different from the Original Position of the MIDI note, Logic moved the MIDI Note.

Playback Position

So whenever we look at a MIDI note to see what its Playback Position is, you have to know that it is determined by two factors, its Original Position + the Position Offset. Only if the Position Offset is zero, then the Playback Position is the same as the Original Position. Please note that the MIDI Editors always show the Playback Position of a MIDI Event.

#2: Quantize is a Command not a Parameter

Once we understand the concept of "Original Position + Position Offset = Playback Position," then there is another important fact.

What does that mean? Look at the following screenshot of the Piano Roll Editor. There is one note selected ➊ and the Inspector on the left ➋ displays its parameters, or does it?

  • Velocity Parameter: The Velocity Slider displays a value of 103 ➌. This is the parameter value that is stored with the MIDI note. Any time we select a note, the slider will display (read) the velocity parameter value that is stored with the note. Changing that value on the slider will change (write) that value.
  • Time Quantize Command: Now let''s look at the other "Parameter", the Quantize value. It looks like the note was quantized to a 1/2 Note grid ➍. But that is NOT the case. The Quantize value in the Inspector does not display how the selected note was quantized. Instead, it shows, with what quantization value the selected note will be quantized when we use the Quantize Command.

What about the Region Parameter?

The Region Inspector in the Main Window displays the Region Parameters ➎ of the selected Region(s) ➏. These are the parameters stored with the Regions, for example, Mute, Transpose offset, Velocity offset. When you select a Region, the Inspector displays (reads) the stored parameters and when you change the values in the Inspector, it changes (writes) those values in that Region.

But be careful: One of the Region Parameters is the Quantize Parameter with the quantize value. Although this value is stored with the Region (and can be considered a Parameter) it is not necessarily the value that the MIDI notes inside are quantized. To better understand this, let''s reveal the next insight.

#3: Quantization can be applied on two Levels

In the following diagram, I try to illustrate the complete picture how the Quantize feature is implemented in Logic. It is getting a little bit technical, but try to follow the indicated numbers closely to understand this very important mechanism.

The main aspect is that the quantize command can be applied on two different levels and each one overwrites the other one.

The two levels are the Tracks Window ➊ and the Editor Window ➋ (in this case the Piano Roll Editor). And again, you are applying a command (Insight #2) and that command moves the MIDI Event away from its Original Position by adding an offset (Insight #1). Every time you apply a new Quantize command, the offset (how much the note gets moved) will change depending on the applied quantization value. Although this is a standard editing procedure where you update parameter values, in this case, there is a major difference:

  • The update (sending a new quantize value) can be done in two places which affect different Events: All Events ➌ or Selected Events ➍.
  • Logic doesn''t store the latest quantize value that was sent. Instead, it stores the "effect", which is a new position ("Playback Position") regardless of from where it was sent and with what value.

Quantize All Events or Selected Events

  • Every Quantize Command sent while in the Tracks Window (has key focus) will apply to all Events in the selected Region(s) ➌. When in the Piano Roll Editor (it has key focus), only the selected Event(s) ➍ will be affected by the Quantize Command.
  • The Quantize Command will also be sent every time you change the value in the Quantize Menu ➎ in the Inspector or by using the Key Command ➏ (Quantize Q and Undo Quantize opt+cmd+Q).

You can hopefully see the danger regarding the key focus. The same Key Command (Q) can have a completely different effect. When the Tracks Window has key focus ➊, then all Events ➌ of the selected Region(s) are quantized. When the Piano Roll ➋ has key focus, then only the selected Events ➍ in the Piano Roll window are quantized when using the Key Command.

Here is another look at the Region Parameter

The Quantize value, sent to the Region from the Main Inspector ➌, is stored with the Region as its Region Parameter ➐ and is displayed ➑ whenever you select the Region. However, if you have in the meantime changed some Events in the Region with the Piano Editor ➍, then the Region Parameter ➐ does not reflect the quantization of all Events inside the Region. It just tells you what value you used the last time in the Main Inspector on the Region.

Here is the previous diagram applied to a screenshot in Logic. This is the mental note you should have in the back of your head whenever you apply a Quantize command. And again, always pay attention to the key focus (that little blue frame) when editing, so you know who the "recipient" of your command will be.

#4: Quantization is based on the Region Timeline

Logic doesn''t place MIDI Events directly on the Project Timeline. What you see on the Track Lane are MIDI Regions, the containers that have the MIDI Events embedded. Editing a Region will affect all the MIDI Events inside equally. To edit the content of a Region (the MIDI Events), you have to "step inside" with the help of a MIDI Editor to access the Region Content.

What you see in the Tracks Window is the Project Timeline. You place Regions on that Timeline, on the Track Lane of specific Tracks.

When you quantize a Regions, for example, to 1/2 notes (now we know that you don''t actually quantize Regions, you quantize the MIDI Events inside a Region), all the notes inside that Region move towards the 1/2 note grid and they line up perfectly on the beats of the Project Timeline. You think you quantized the notes to the Project Timeline - but you didn''t.

Look at the following example:

The "illusion" only happens if the Region starts at the beginning of a bar ➊ (which Regions usually do). If you move a Region to start somewhere in between a bar ➋ and you apply the same 1/2 quantization, then the MIDI notes WILL NOT line up to the 1/2 ➌ grid on the Project Timeline because they are quantized relative to the start of the Region. That means, a Region has its own "invisible Region Timeline" that the quantize command is applied to.

Whenever you want to apply a Quantization but the Region does not start at the downbeat (or at least some beat depending on what quantization value you use), then you might want to move the Region to the beginning of a bar first. And that''s why Logic always rounds the start time of a newly recorded Region to the beginning of a Bar, in case you wondered. For Audio Regions that doesn''t matter because the content of an Audio Region are not MIDI Events, they are something else, which is the topic of another tutorial altogether.


I hope the four insights help you to better understand how Quantization works in Logic and how to use it in your Project. This is just one example that demonstrates that a simple feature can have much more to it if you have a closer look at it. If you take the time and are willing to dig into it, then not only will you gain a better understanding how to use a feature but you will also avoid any potential mistakes due to the lack of the proper understanding.

Graphically Enhanced Manuals (GEM)

Please check the other books in my best-selling “Graphically Enhanced Manuals” (GEM) series, available as PDF files, interactive multi-touch iBooks on Apple’s iBooks Store, or as printed books on Amazon.


Thanks for your time and interest,

Edgar Rothermich