Read The Bleepin’ Manual
MIDI Secret Handshake
OnSong speaks fluent MIDI-in-text, because clicking buttons is for quitters. While you can poke around in the MIDI Events in the Metadata Editor like a normal, well-adjusted human, you can ALSO just type your MIDI commands as text. ZOMG, the power!!1!
Stuff Separated By Other Stuff
First & foremost, you can cram a bunch of MIDI commands together as long as you separate them with a tab, comma, semi-colon, vertical pipe, or a new line. Pick your poison. The comma is the cool kid everybody uses. Like so:
1.2:0@0, PC1.2:3@0, N67@1, START, SS8
Channel (Not The TV Kind)
Every entry may have an @ symbol. The number after it is the channel the command gets sent on. Because MIDI counts from zero (yeah, we know, nerds), channel one is a zero (0), channel two is a one (1), & so on. Welcome to the math club, amirite?
No @ symbol? Then the command goes out (or comes in) on ALL the channels. Shout it from the rooftops!
Prefixes (The Secret Handshake)
Every entry has a prefix that tells OnSong what kind of MIDI command you're slingin’. Behold the laundry list:
- PC or No Prefix is a program change event. Lazy? We respect that.
- N is a note event.
- CC is a control change event.
- SS is a song select event.
- START is a start command. Wow. Shocking.
- STOP is a stop command. Also shocking.
- CONTINUE is a continue command. Plot twist!
- F0 prefixes a SysEx message. Fancy!
- WAIT implements a delay. Patience, grasshopper.
Values (The Meat & Potatoes)
The value sits right before the @ symbol, or at the end of the entry if you skipped the @. It’s the number for your program change, control change, note, or song select, depending on the prefix. For SysEx entries, the hexadecimal value goes right after the F0 prefix, which acts as a header for every SysEx command. Hex. Because regular numbers were too easy.
Subvalues (Values Had Babies)
Sometimes a MIDI command needs MOAR info. Stuff like MSB & LSB, or velocity for control values, hitches a ride as subvalues. You add a colon in the value part, & the subvalue means something different depending on the command. Srsly, it’s context all the way down:
- Program Change subvalues are the MSB/LSB of the program change. They’re split by a period with the MSB on the left & the LSB on the right. Left is MSB. Right is LSB. Don’t mix ’em up. We’re watchin’.
- Control Change uses the subvalue to set the control value. Pick any number from 0 to 127. Skip it & we’ll just assume 127, because we’re dramatic like that.
- Note Event subvalue is the velocity, aka how hard you smack the note. Any number from 0 to 127.
Examples (Copy & Paste, You Know You Will)
Let’s start easy with a program change. Here we use program change 8 that also sends an MSB of 4 & an LSB of 2 on channel 1. We start with the most complicated version & strip away the bank select & channel until it gets nice & vague, just like your last relationship:
PC3.1:7@0, 3.1:7@0, 3:7@0, 3:7, 7@0, 7
Control changes are similar, except the left side is the control change number & the right side is an optional value. Forget the value & we send 127 instead. We’re sendin’ Control Change 106 with a value of 64 on channel 3. (Yes, the example says 105 & 63. Don’t look at us, we just work here.)
CC105:63@2, CC105:63. CC105@2, CC105
Now for note events. Say you wanna play C4 on channel 8 at 75% velocity. Since OnSong counts MIDI C0 as 0 on the MIDI note scale, you’d type this:
N60:95@7, N60@7, N60:95, N60
Again, ZOMG, remember: the more values you ditch from your MIDI syntax, the broader & less specific the statement gets. For instance, that last note event sends C4 at 100% velocity on ALL channels. Subtlety? Never heard of her.
Need a delay between your other MIDI events? Use the WAIT command with a number. The number can be a whole integer. Use 1-10 for seconds, or go bigger for milliseconds. Below you’ll find waiting for 2 seconds, 10 seconds & half a second. Go grab a snack.
WAIT2, WAIT10, WAIT500