What is MIDI #2 - a breakdown of MIDI messages
If you've read the previous entry
(thanks,) I used the analogy of MIDI keyboard controllers being similar to QWERTY keyboards. This is the most rudimentary idea of conceptualizing MIDI control. It leaves out a lot of details but helps frame the basic concept. In this entry I'm going to break down what really happens when you play a "C" on the jamstik or a keyboard controller, and hopefully bring some clarity to the whole concept.
Let's go back to playing a note the G string of your jamstik, fret 5. That's a "C." When you strike that string with a pick, the jamstik sends out a MIDI Event that looks like this: Note On C4 Channel 3 Velocity 72
This isn't EXACTLY how it looks, but it's roughly the idea. This is the basics of the MIDI message that incorporate all of the usual parameters associated with a plain-jane "Note On."
It has a Note On with a Note Number (C4
it indicates what MIDI Channel the Note On was sent from (Channel 3
- and we'll talk about Channels next so don't let that throw you,)
and it has a Velocity value of 72
(which indicates on a range from 0-127 you played it at around two-thirds of maximum intensity.)
If we break that down a step further we can tease out some more understanding. Note Numbers:
The Note On C4 isn't really transmitted as "C4." It's transmitted as MIDI Note Number 60
. There are 128 MIDI Note numbers available, they're all unique so there's no possibility of a C4 getting interpreted as a C3 or C5 because C4 has a Note Number of 60. C3 is 48, and C5 is 72. It's not important to memorize the Note Numbers as long as you understand that each one is unique, and they range from 0 (C0 - way low in pitch) in consecutive ascending order through to 127 (G11 - which is off the map of an 88 key controller.) The Note Number is unique and important as it indicates what pitch the receiving MIDI device should generate. MIDI Channels:
When MIDI was being conceptualized, the really smart brains behind it gave each MIDI cable (or port) the ability to handle 16 channels. If we revisit our QWERTY analogy, having 16 channels available gives you the ability to type "MUSIC" on 16 different computer screens from one connected QWERTY keyboard without having to repatch it to every machine. Our magical MIDI connections between computers would allow us to type "Music" on MIDI Channel 1, and the computers addressed on channels 2 through 16 would know that our "Music" typing wasn't intended for them - it was addressed on MIDI Channel 1. If we wanted the computer on Channel 2 to display "Music" we'd change the channel of our QWERTY keyboard to MIDI Out Channel 2. Every MIDI event has a corresponding MIDI Channel.
MIDI Channels can be a source of confusion. Many users might just connect a USB-MIDI controller and start playing into a DAW and never have a need to leave the default MIDI channel (which is usually Channel 1.) If you're not aware that a patch or device might be only receiving on Channel 2 or Channel 10, you could be sending MIDI all day from Channel 1 and scratching your head.
Here's where the jamstik comes in; the jamstik defaults to transmitting MIDI on 6 channels. The orientation of how "real" guitars map their notes out has some overlap, even on a five fret guitar like the jamstik there are duplications in where the same note numbers can be generated from. (For example, G String fret 4 sends B3 and so does the open B string.) To prevent the MIDI Note Ons from creating simultaneous conflicting input, the gurus behind MIDI guitars set up a soft protocol that put each guitar string on a unique MIDI Channel, 1 through 6. This prevents the receiving software from confusing the C4 on fret 5 of the G string (Channel 3) with C4 on fret 1 of the B string (Channel 2.) While that may seem redundant, there are many circumstances where the same note number being used on two strings would create conflicts.
When you lift your finger off that note on the jamstik, it sends a similar message like this:Note Off C4 Channel 3
Notice how MIDI didn't calculate the length of how long you held the note, it just said "Note On" when you picked the note ("now" would be implied here) and "Note Off" when you lifted your finger. Note On's and Note Off's are binary, On or Off. No timing data is sent, no note length data is sent. It's Note On, Note Off, what Channel.
If you open an Event List editor and you see note length data and timestamps next to MIDI note events, your DAW or sequencing app is calculating that timing between the Note On and Note Off for you. (That's something your software is doing additionally in the interface for you to see, it's reporting on the MIDI activity, but it's not in the MIDI data from your controller.)Velocity:
There's one more element in the MIDI Note Event that I should highlight, Velocity. Velocity values in MIDI messages refer to how hard or soft you struck a note. In the days when MIDI was primarily a keyboard interface protocol, Velocity was measured by how fast you struck a key (and speed correlated to how much force you applied to the key, or how dynamically hard or soft you intended the note to sound.) While it seems crude, Velocity is actually a pretty good indicator of dynamics. In the sound design for a patch, the designer often maps samples that have more intensity to the higher Velocity values OR dynamically controls filters according to Velocity values. Because Velocity is a one-time event with the Note On (you can't create a Velocity message without striking a Note On, and a Note On requires something to indicate "how hard or soft did you strike that,") it gets tucked in with the Note event.
Velocity messages on the jamstik are generated by how hard or soft you strike a string. One note about Velocity - Velocity in MIDI is NOT Volume.
It's easy to confuse the two because when you want a loud note you strike the key or string harder and it calls up the "louder" sample or "louder" set of parameters. I'll touch on this more in our next entry about Continuous Controllers, but here's an easy way to distinguish between Velocity and Volume. Velocity is a dynamic value attached to a Note Event. If I want to play a pattern of eighth notes that alternates loud soft loud soft, Velocity allows me to do that WITHOUT manipulating the output volume of the sound. Volume messages in MIDI DO manipulate the output volume of the sound, which could screw with your mix if you were sending a unique Volume command with every note... AND it would sound kind of phony.
The next entry in this series deals with (you guessed it) Continuous Controllers like Volume, Pitch Bend, Modulation, Sustain Pedal, etc. If you get the chance, open up a list editor in your favorite DAW or download a MIDI app that displays MIDI data and look for Note Numbers, Channels, and Velocities.