Logic: Working With The Transform Window

Logic Notes & Techniques
Published September 2009
By Geoff Smith

Complex tasks of all kinds can be done quickly and easily with Logic's Transform window.

In this screen, the Transform window is being used to ease the drum replacement process for a multi‑miked drum recording, by automatically setting all the 'audio‑to‑score converted' snare notes to D1, to trigger a replacement snare from the Ultrabeat drum machine, and making their length consistent for easier viewing and editing.

The Transform window is an off‑line MIDI processor, which can be configured to quickly perform complex tasks that would take a long time in Logic's other MIDI editors. (The Environment features a similar object called the Transformer, which is used for real‑time MIDI event processing.) The Transform window can be incredibly useful, but to understand how it works, it helps to know the format used by MIDI messages.

Binary & MIDI Messages

Binary numbers are a method of counting in base 2 rather than the decimal (base 10) formats we are accustomed to, and consist of only zeros and ones. A single zero or one represents a 'bit', and each bit in a message represents a power of two. The binary number 1001 is thus a 4‑bit number with a decimal value of 9 (see the table below).

 4‑bit binary numbers Decimal equivalent 2*3 2*2 2*1 2*0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 2 0 0 1 1 3 0 1 0 0 4 0 1 0 1 5 0 1 1 0 6 0 1 1 1 7 1 0 0 0 8 1 1 1 1 15 max value

The more bits in the number, the higher the decimal value it can represent. For example, an 8‑bit number can have a maximum value of 255 (11111111).

The MIDI messages we'll consider in this article are Note On and Note Off messages and Control data messages. These messages are made up of three bytes, a byte being an 8‑bit binary number. The first byte is referred to as the Status Byte and is divided into two 4‑bit numbers. The first defines the type of message being sent; for example, 1001 is a Note On. The second 4‑bit chunk is the Channel message, which can range from 0000 to 1111, giving a decimal range of 0‑15, and thus the ability to address 16 channels.

Then come two Data Bytes: the first or most significant bit of each Data Byte is zero and is unused, leaving seven bits, with a possible range of 0‑127. Data Bytes 1 and 2 are used for different purposes depending on the message type. For example, in a Note On message, Data Byte 1 is Key Number (pitch) and Data Byte 2 is Velocity. This is further illustrated by the table below (see also www.midi.org/techspecs/midimessages.php).

 Status Byte Data Byte 1 Data Byte 2 Status (4 bits) Channel (4 bits) Note On 1001Note Off 1000 MIDI Channel (0‑15, ie. 0000 to 1111) Key Number (0‑127) Velocity (0‑127) Control Change 1011 MIDI channel (0‑15) CC number (0‑119)* Value (0‑127) * CC (Continuous Controller) numbers 120‑127 are reserved for Channel Mode messages.

The anatomy of note and control change MIDI messages.

Let's look at the following example message and figure out what it means:

Status Byte: 10010001

Data Byte 1: 01010100

Data Byte 2: 01110000

Breaking the Status Byte into two 4‑bit numbers gives, first, 1001, which signifies a Note On message; then 0001 for the channel message, signifying MIDI channel 2 (remember, a channel value of 0 counts as channel 1). Converting the Data Byte 1 (Key Number) binary value to decimal gives a note number of 84, which is a C6. Converting the Data Byte 2 (Velocity) binary value to decimal gives a velocity of 112. We thus have a C6 Note On message arriving on MIDI channel 2 with a velocity of 112. Voila! You now understand the basis of MIDI messages. But how does that help with the Transform window? Stay with me just a bit longer...

The Transform Window

An Initialised Transform Set.To call up the Transform window, go Window / Transform or use Command‑4. The contents of the window are called a 'Transform Set' and can be saved and recalled from the preset menu in the top left‑hand corner of the window. Choose 'Create Initialised User Set' from the menu. A prompt will then appear; choose 'Create'. This creates a blank Transform Set ready to configure.

With the exception of position, length and sub‑position menus (which relate to where MIDI events are on the timeline) the Transform window is laid out like the MIDI messages we've discussed. There are separate Status and Channel columns for the two 4‑bit numbers within the Status Byte, then Data Byte 1 and 2 columns that contain 7–bit numbers.

 Status Channel Data Byte 1 Data Byte 2 Note MIDI channel note sent from Pitch Velocity Control (CC data) MIDI channel CC sent from CC no. Value 0‑127 Fader* Plug‑in slot number† Control no. for plug‑in parameter Value 0‑127 * Logic's internal message format for controlling plug‑in and instrument parameters.† Varies between instrument and audio channels.

Transform window Condition table.

The main part of the Transform window is essentially divided into two sections, the top half dedicated to Condition menus and the bottom half to Operation menus. You specify Conditions to tell Logic which events you want to process and Operations to tell it how to process them. To use an analogy, imagine you have a long line of pieces of fruit, randomly mixed. To apply an Operation to a specific fruit type, you need to specify Conditions. For example, you might say 'select only the citrus fruit in the first half of the line'. Then you specify an Operation, such as 'squash them with a 50‑ton hammer'!

Drum Replacement

Let's learn to use the Transform interface with some examples. First, how about using it to streamline the drum replacement process for a multi‑miked drum recording? (The process was outlined in full in Sound On Sound March 2008.) First, take an audio track with a close‑miked drum recording on it — for example, a snare. Select the region containing the snare recording, call up the Sample Editor, and choose Audio to Score from the Factory menu. This will generate a MIDI region on the Arrange page with the appropriate MIDI notes representing that snare performance. Now drag that MIDI region onto a software instrument track and call up the Ultrabeat drum machine.

The 'Audio to Score' process will try to guess the pitch of the snare performance, but a five‑minute drum recording can contain many different notes, which could take a long time to individually move to a specific pitch. With one easy Transform Set you can move them all to a desired note value to trigger a replacement snare in Ultrabeat (see the screen at the start of this article).

• In the initialised Transform window, set the Condition Status to Note, so the operation affects all notes in the region.

• In the Operation section, set the Pitch field to 'Fix' all the notes to D1 (which will trigger a snare in Ultrabeat).

• We can also use this Transform Set to perform another useful function. In the operation Length field, choose 'Fix' and set the length value to 30. All the MIDI notes will then be set to a consistent length so that they're easy to see and edit.

• Press the Select and Operate button to select the snare notes and carry out the Operations. You should see all your notes aligned to D1, and 30 ticks in duration.

• In the presets menu, click on the existing Transform Set name and rename it 'Snare Drum'. Hit 'Enter' and, at the prompt, choose the 'Create' option. You now have a preset for this task.

Removing Spill

If you're not using a snare track that's already been cleaned of spill, there will be extra notes at low velocities. Let's use another Transform Set to remove them.These settings removed spill from my snare track.

• In the Preset menu, create a new initialised Transform Set.

• Call up the piano‑roll editor and view the velocities of the snare track in the Hyperdraw display (to do this, click the Hyperdraw button at the lower left corner of the Piano Roll Editor, then, in the new display area, click on the arrow to the left and choose Note velocity from the menu).

• Listen to the converted MIDI snare performance against the original audio track. If you see extra notes in the MIDI track at low velocities, caused by spill from other hits, identify their highest velocity values in the Hyper editor while you listen.

• In the Transform window, set the Status Condition to Note and the Velocity Condition to 'less than' (<=), then input the velocity value below which you want to remove everything (I chose 20).

• In the Mode menu, choose 'Delete selected events'.

• Click Select Only and Logic will select velocities below 20. Click Operate Only to delete the notes. Once again, save this Transform Set and call it 'Remove Spill'.

Velocity Compression

Here the Transform window is applying 'MIDI compression' to even out the velocities of the snare part.Say the drummer lacked consistency and the velocity of the snare performance has too much variation. A Transform Set can make it more consistent. First, set Status Condition to Note and Velocity Operation to Scale. Looking at the Scale Condition, the upper value sets a percentage by which to multiply all velocities, in this case to reduce dynamic range. The bottom value adds an amount to all velocities, to bring overall level back up. The effect is like a MIDI velocity compressor. The screen above shows velocities being scaled to 33 percent of their original values and then having 75 added to each.

Going Further

Once you've created useful Transform Sets, they can be saved as part of an autoload template or imported from a previous project using File Menu / Project Settings / Import Settings.

Published September 2009