Using Logic Pro’s Transformer Object
The Transformer object in the Environment is one of the most powerful tools Logic has to offer. With a little bit of MIDI know-how, it can become an incredibly powerful creative tool. In the second part of this Environment series we’re going to look at the basic concept of how the Transformer interprets and manipulates MIDI messages. Even if you don’t have Logic, there’s some useful information about MIDI as well.
Before we start I’d recommend you read the article first — before watching the screencast!
Screencast
Introduction
In Logic ‘transforming’ is the process of altering MIDI messages. It can either be used to modify incoming MIDI messages via the Transformer object (which can be found in the Environment) or to modify prerecorded MIDI parts via the Transform window (Command+4). The object version can be used for more creative purposes while the window version can be used for batch processing MIDI data in your arrangement and save you heaps of manual labor. Although we’re not going to cover the Transform window in this tutorial once you understand the concept it’s pretty much the same as the object.
But first to use these powerful features it’s vitally important to understand how a MIDI message is constructed as both transformers use this structure as the basis for tasks. Without knowing this it just looks scary!

The Anatomy of MIDI

MIDI is without a doubt one of the most important technological developments in music production of the last 25 years, even crossing over into our everyday lives — just think mobile phone ringtones. It even controls games like Guitar Hero! We all use it in music production, but mostly on a very superficial level through a UI. So what is MIDI and how does it work?
MIDI (short for Musical Instrument Digital Interface) is an 8 bit binary language that was developed in the early 80’s by Dave Smith and Chet Wood in an attempt to standardize communication protocols between different manufacturer’s evolving digital synthesizer technologies. In 1983, the MIDI 1.0 specification was released to the world and despite a couple of enhancements remains pretty much the same to this day. It allows all manner of musical devices from synths, sequencers, hardware effects and even stage lighting to speak to each other in a cross-platform, universal language.
MIDI data is sent inside a MIDI ‘message’. There are three kinds of MIDI messages.
- Voice – Used to control things that relate to performance like notes, pitchbend and other controller data. These are the most common types of MIDI messages and the most basic.
- Channel Mode – Voice controller numbers 120-127 are reserved for Channel messages that affect how the MIDI channel operates. Is it Monophonic or Polyphonic? Others include Reset for notes and controllers and Local On/Off that unlinks the keyboard from the synth engine.
- System Exclusive – These messages are used to reach parameters that MIDI wasn’t designed to get to. They are usually manufacturer specific and transmitted in Hexidecimal format. They can relate to internal parameters like chorus speed or reverb time. Every manufacturers device has a unique SysEx ID that has to be transmitted in order to access these types of parameters. They also access MIDI timecode and MIDI Machine Control data and System Dumps for downloading a sound’s parameters onto a sequencer track for later recall. This is not light reading folks, proceed with caution!
Luckily we’re interested in voice messages as they control the basic performance data.
Breaking the Code
A basic MIDI message is made up of two or more bytes. Bytes are made up of 8 bits. Each bit is like a switch — either OFF (0) or ON (1). Binary code like this allows us to make big numbers with less code and MIDI was designed to be as small as possible to overcome latency issues as MIDI is transmitted in series (one message follows another).
A byte can have a maximum decimal value of 255 (adding all the ON values). I don’t want to get into a lesson in counting in binary but here’s a very quick example.

There are two kinds of byte types associated with MIDI messages.
Status Bytes – The Status Byte is delivered first. It tells the device receiving it what kind of MIDI message it is. They always start with a 1. This gives them a potential value somewhere between 0-255 — in binary that’s 00000000 – 11111111. Typical voice message Status Bytes are note, pitchbend, control, aftertouch and program change.
More often than not the status byte is split into two four bit messages called ‘nibbles’. In voice messages one nibble holds the type of voice message (status) while the other holds the MIDI channel data. Interestingly the highest decimal value of a nibble is 16, which is why we have only 16 MIDI channels.
Data Bytes – The Data Byte holds the value of the status byte. They always start with a 0 giving them a potential value between 0-127, in binary that’s 00000000 – 01111111.
This value of 0-127 is probably something your very familiar with. Note numbers go from 0-127. Same for velocity, modulation data and so on. One exception to this is pitchbend which uses two bytes giving it 14 bit resolution to avoid ’stepping’. Why 14 bit? Because Data Bytes only have seven bit resolution — don’t forget they start with a 0 which defines them as a Data Byte, and two times seven is 14. This 14 bit message gives pitchbend a resolution of 16,384 steps over all 128 note numbers. Meaning each note has 128 steps before it gets to the next note, producing a smooth transition.
Below is a diagram of a basic Note On message. You get the picture of how bytes are put together to make a MIDI message.

The Transformer Structure
So let’s have a look at our Transformer object. The Transformer object can be found in the environment menus by selecting New > Transformer. Double click the Transformer object and a window will open.

The four rows of dropdowns at the top are labeled Status, Channel, Data Byte 1 and Data Byte 2 just like the structure of the MIDI message in the diagram above. The structure of MIDI messages does vary slightly from one to another. Here’s a quick break down of how voice messages differ. All these will be transmitted over MIDI channel 1 (the second nibble of the status byte). It’s important to add that you don’t need to learn the binary assignments of the Status Bytes, since your DAW will translate them into English.

The only curious thing in this list are the values MSB and LSB. These stand for Most Significant Byte and Least Significant Byte. This is just a binary thing expressing which byte holds the highest value.
Here’s how the voice message structures look when applied to the Transformer.

Conditions
The Conditions section is where you define the parameters you want to transform. The dropdown menus contain various ‘Conditional Statements’. These are similar to the kind of conditionals you find in programming languages like Javascript or PHP in web design. If X = Y, then perform an action on it. Choosing a condition from the drop down will open up a parameter box where you can add the value for your condition. For example choosing ‘Equal’ will bring up one value choice, the number you want your choice to be equal to. Choosing ‘Inside’ will bring up two value choices where you can set the range of your condition. Leaving the dropdown set to ‘All’ allows you to effect the full range, or all values in any given byte.

In the picture above, I’ve set a condition that looks for any MIDI message equal to Control Data (Status Nibble 1) on all MIDI channels (Status Nibble 2) with a controller number of 12 (Data Byte 1) and only effect the values of that controller number between 10 and 50 (Data Byte 2).
Operators
The Operations section is where you apply the formula for your transformations. These can be simple mathematical operations like add and subtract or more complex scenarios using the Map. ‘Fix’ is a very common value here, especially when dealing with the status of the message. To change controller values to note values you would select ‘Control’ in the status column in Conditions and ‘Fix’ it to ‘Note’ in the Operations column. This simply restructures the binary code in the first nibble from 1011 which is Control Change to a different value of 1001, which is Note On. Simple! The ‘Thru’ setting allows data to pass through untouched.

In this example I’ve added 6 to the number in Data Byte 1. This simple operation turns Modulation (Controller No 1) into Volume (Controller No 7). 1+6=7.

Routing
The three lines that separate Conditions and Operations are used to route values from one byte to another during a transformation. This is because most messages have a different structure. For instance if you wanted to convert note numbers to pan values you might think this is okay.

There is a problem here, though. The note numbers are stored in Data Byte 1 in the note message and in the control message the pan value is stored in Data Byte 2. At the moment the pan value is being controlled by note velocity from Data Byte 2 of the note message. To get round this, click twice on the line that connects Data Byte 2. This now reroutes the Note number value into Data Byte 2 of the control message. Problem solved! This makes a good case for knowing the structure of MIDI messages.

Transformer Modes
Transformer Modes allow you perform various tasks dealing with filtering certain messages and how the Transformer actually outputs its data.

A good example is the Condition splitter (true > top cable) Mode. This outputs the transformed message via the top output cable and any MIDI messages that don’t meet the Conditions specified (i.e. Control No 1) are passed out of the bottom cables. This is very useful when you want to redirect just the transformed data to a different destination. Below you can see that the Note messages ( which don’t meet the Condition ) are passed out the bottom cable. The manual has full details of the modes so check them out.

There are some cases when modes are the only way to solve a problem. The screencast has a good example of this using the Alternating Split mode to separate Note On and Note Off messages.
Maps
The Map is available in both Conditions and Operations, although you can only use one Map at any given time. Think of it like an XY graph.

It basically allows you to map any number between 0 – 127 along the X axis to a different value using the Y axis. This is done by using the mouse to draw in the new value or using the input boxes at the bottom.

There are many applications for the map like creating velocity curves and random numbers. In the Operations dropdown list there are several operations that use the map as a base but use parameters to modify it. These include Random, Crescendo, and Reverse. Only the option called ‘Use Map’ allows you to input your own custom map.
Below you can see by pressing the ‘Initialize’ button the values along the bottom (X axis) are the same as the values on the Y axis.

By pressing the ‘Reverse’ button at the bottom the values along the bottom are now inverted. What was 0-127 is now 127-0.

This is a very simple example and it’s possible to create very complex and specific maps if you want. One thing to look out for is drawing in the map can be very tedious due to its size, so patience is required!
Using Monitor Objects
Monitor objects allow you to see the information passing through a cable. These are essential for troubleshooting MIDI. The data is represented in four columns just like the structure of the transformer. Just insert them between objects to keep track of your MIDI messages.

MIDI Resources
If you’d like to learn more about MIDI there are plenty of resources out there. Here are some good starting points.
- A list of Controller Number assignments
- MIDI Note numbers
- MIDI on Wikipedia
- MIDI Manufacturers Association
Conclusion
After reading this you should have a pretty fair grasp of how the Transformer works and maybe learned a thing or two about MIDI. Like all things, the more you practice and experiment the better you’ll get at using the Transformer. Of course the key is thinking up some clever uses for it! The manual is a good place to start to understand things like the Modes and Conditional Statements. Next time we’re going to put it all together and build some performance related stuff in the Environment. I hope this has been useful, and see you next time.
wow. definetly this will help with all those quaestions ..
Thank you very much
after a quick scan this looks worth the wait….will check it out in full sometime in the next few days..cheers
This is definitely the best tutorial on the transformer I have every seen. Great job!
Awesome article, put in really easy to understand text for the layman, like myself. Just a question, if a status byte always starts with a 1, wouldn’t that mean that the status byte would have value ranging from 128-255, rather than 0-255? Slightly confused.
Cheers
Great and informative tutorial! Though, you wrote:
[Status bytes] “always start with a 1. This gives them a potential value somewhere between 0-255 — in binary that’s 00000000 – 11111111.”
If they always start with 1, that must be 10000000 – 11111111, or 128-255, right?
You could be right there! Oops!!! Totally over looked that one! 128-255 is right. It’s a plain Byte that has the 0-255. Me + Maths = Fail
Just glad I don’t have to program MIDI in binary! I’d be out of a job!
Well spotted and sorry for the confusion!
Glad you liked the tutorial as well.
Tob
lots of $#!& i would never understand o.o
on a separate issue – I just don’t get how to only allow notes between certain pitches though, and block the rest. I want to use only notes below F3 for a bass line, and not pass the others. this is for playing live.
tried lots of combinations but can’t get the transformer to work
ani ideas?
Ave.
You need to choose the right transform ‘mode’ to do this. In the top right hand corner choose ‘Filter non matching events’. Then in Data Byte 1 in conditions use the ‘inside’ (C-1 – F3) or <= (less than or equal to) and choose F3 as the high value to allow the transformer to block the rest of the notes from the output.
This should work.
is it possible to modulate say the FM amount wheel of the EFM using note data?
maybe using faders…god knows…
thanks
g
Totally! Transform the note data into Fader data. You can find the FM amount number by plugging a monitor into the channel strip like in the screencast.
You’ll have to do this via a control track (see screencast). just make an alias of your midi part and put it on the control track so if you change the notes they will be reflected in the transformation.
Then transform the ‘note’ status to ‘fader’ and assign the fader numbers (use FIX). Route status byte 1 in ‘conditions’ to status byte 2 in ‘operations’ to use the pitch value as the fader value.
You might want to add a ‘divide’ or ‘multiply’ into status byte 2 in the operations to fine tune the amount of the effect.
Let me know how you get on!
wow thank you Toby…this is a bit of an eye opener!I have a lot to learn about this and am still a bit confused tbh but i’m gonna read this tut a couple of times and watch the video again.
If you could be so kind could you tell me if it if possible to use the transformer to tell the reverb wet amount on space designer to be at min level when a note is held and jump up to a set level when the note is released? i’m guessing it is but not quite got a grasp of this one yet.
thanks
Jimbo
sorry just read post above…would it be same procedure as you explained in answer to the question about fm amount wheel above…i guess so…i’ll give it a go after i have had some sleep.
argggh.i’m determined to get my head around this but i’m starting to think i might be a bit slow! If anyone is able to help would be very much appreciated.
Cant seem to get the monitor thing to tell me what the reverb wet amount number is…ie if i move any parameters on the instrument track that has the space designer on and which i have plugged the monitor object into nothing is displayed on the moniter object it is just blank!? I have tried to do this via a control track but i must be doing something wrong.
basically been trying to set it up so that the reverb wet amount is transformed by a note on and note off message but so far i’m losing badly!
Cheers if anyone can help.
J
ok i figured out the monitor object/fader thing now..i’m getting there sloooooooowly.
heloo…got it so that the reverb amount goes up now when a note is pressed…but i want the opposite..to go up when note is releases…still stuck…anyone care to help b4 i throw my computer against a wall?
Sorry for the late reply, been a bit busy.
I think you need to try out the ‘Alternate Split’ function from the Transformer menu! The ‘on’ value comes out the top cable and the ‘off’ value comes out a bottom cable that goes to another transformer to make the release value.
Not in front of Logic so can’t be 100% sure but I think that’s the solution!
If your still stuck (It’s been a while!) comment with your email address and the author might be kind enough to send you a working example!
Let me know.
Hi Toby,
Thanks for the reply, i have tried for ages to get this set up but i’m still stuck!…i have no problem in getting the note on to go to a specified value on the reverb wet amount…but i cannot seem to get it so that anything happens on a note of at all…i don’t get it…if there is anyway you could help guide me through this i would be very grateful as i have wasted so much time trying to get this right.
Many Thanks
Jimbo
The best “ever” tutorial about Transformers!!! Please man give us more…i think you really are the only one (so good)
really really helpful tutorial! thank you. i hope there are more to come.
re macros, i’ve managed to group buttons into a macro, and it worked perfectly, but when i put faders into macros, they haven’t worked yet… any thoughts? or general rules about macros?
its all clear to me..exept one thing how do we figure out that the 6+1=7
is the volume control and the number 1 is modulation?