ONSONG CHARTS AVAILABLE NOW! LEARN MORE HERE

Read The Bleepin’ Manual

MIDI Word Soup

OnSong uses a text-based syntax for expressin' MIDI commands. While you can use the MIDI Events in the Metadata Editor, you can also express MIDI commands in text. (Thrilling stuff, we know. You're welcome.)

Separated by All the Things

First & foremost, multiple MIDI commands can be separated by various characters includin': a tab character, comma, semi-colon, vertical pipe, or new line. The comma is the most common delimiter. (We didn't invent it, but we'll take credit anyway.) For example:

1.2:0@0, PC1.2:3@0, N67@1, START, SS8

Channel (AKA: Which MIDI Highway You're Screamin' Down)

Each entry may contain an @ symbol. The numeric value after the symbol is the channel on which the command is to be sent. Since channels in MIDI start on zero, channel one would be a zero (0), channel two a one (1), etc. (Math is fun!)

If no @ symbol is used, the command is sent or received on all channels. (Spray & pray, baby.)

Prefixes (The Secret Handshake)

Each entry in the list contains a prefix. This prefix determines what type of MIDI command to send. These include:

  • PC or No Prefix is a program change event. (Pick a sound, any sound!)
  • N is a note event (Make some noise!)
  • CC is a control change event. (Twist the knob, see what happens.)
  • SS is a song select event. (Pick a song, any song!)
  • START is a start command. (Go go go!)
  • STOP is a stop command. (Nope, stop it.)
  • CONTINUE is a continue command. (We didn't actually stop, just kiddin'.)
  • F0 prefixes a SysEx message. (For the nerds who like hexadecimal.)

Values (The Actual Numbers That Matter)

The value of the command appears just before the @ symbol or at the end of the entry if no @ is given. This is the value of the program change, control change, note, or song select based on the prefix. In the case of SysEx entries, the hexadecimal value of the SysEx is provided directly after the F0 prefix which is used as a header to all SysEx commands. (Congrats on stickin' with us this long.)

Subvalues (When One Number Just Isn't Enough)

In some cases, additional information is conveyed in the MIDI command as subvalues. For instance, MSB & LSB, as well as velocity of control values can be sent this way. This is expressed through the addition of a colon in the value portion. The subvalue has different context dependin' on the type of MIDI command sent:

  • Program Change has subvalues alignin' with the MSB/LSB of the program change. These values are separated by a period with the MSB on the left & the LSB on the right. (It's like a sandwich.)
  • Control Change has the value of the control set usin' this. The number can be between 0 & 127. If omitted, the value of 127 is inferred. (We're assumin' you want it loud.)
  • Note Event has a subvalue relatin' to the velocity at which the note should be played. This can be set to a numerical value between 0 & 127. (Gentle tap or freakin' smash it?)

Examples (Finally, the Fun Part)

Let's start with a simple program change. In this scenario we use program change 8 that also sends an MSB of 4 & an LSB of 2 on channel 1. The example starts with the most complex variation of this & removes the bank select & channel to become more broad. (It's like un-seasonin' your food.)

PC3.1:7@0, 3.1:7@0, 3:7@0, 3:7, 7@0, 7

Control changes are similar except that the left side of the syntax is the control change number & the right side is an optional value. If the value is not provided, 127 is sent instead. We will send Control Change 106 with a value of 64 on channel 3. (Trust us, it works. Probably.)

CC105:63@2, CC105:63. CC105@2, CC105

Now let's take a look at note events. We want to play C4 on channel 8 at 75% velocity, we would enter the followin' because OnSong starts countin' MIDI C0 as 0 on the MIDI note scale. (Yes, we're startin' at zero. Yes, it's annoyin'. No, we're not changin' it.)

N60:95@7, N60@7, N60:95, N60

Again, it is important to remember that as values are removed from the MIDI syntax, the MIDI statement becomes more broad & less specific. For instance, the last version of the note event will send C4 at 100% velocity on all channels. (Translation: you're bein' lazy, & OnSong's cool with that.)

OnSong 1.999 — Last Refreshed November 23, 2014