MIDI shorthand/messages

Found under: Settings > MIDI > [All options to edit/add MIDI code]

MIDI Shorthand

OpenSongApp will understand hexadecimal MIDI messages (more info below), but encourages you to use the MIDI shorthand builder that helps you build readable MIDI messages.  MIDI shorthand can be used for inline MIDI messages (for song sections), song messages (when loading), MIDI actions (assignable controllers).

Whilst the app will allow you to create MIDI shorthand messages, you can manually add these as inline MIDI commands when editing songs, or by manually typing in song MIDI messages in the Song Edit > Song Features tab.

When editing MIDI board commands, MIDI assignable actions, or MIDI song messages, you will have the option to edit the commands.  This option will always show the New MIDI Shorthand code creator window shown here.

It's pretty easy to use - pick a MIDI channel, type of action (there are basic options and also specific BeatBuddy commands), set the values for the command as required.  Most devices you are trying to control will list the MIDI message types that it can respond to.

To test the message works, click on the TEST button (assuming you have already connected a MIDI device to OpenSongApp).  If the action functions correctly, you can add it to the list of messages.  Multiple messages can be added and dragged up and down to rearrange and also swiped away to clear them.

Once you have set all of the required messages, click on the SAVE button to return to the previous screen.

Understanding the MIDI shorthand code

The basics of the shorthand code is shown below.  When using MIDI shorthand as inline song messages, the line with the MIDI code needs to start with a ; to signify it is a comment line (isn't projected).


;MIDI{1-16}:{CC,PC,NO,NX,MSB,LSB,BB..}{0-127}:{0-127}


CC = Control change

PC = Program change

NO = note on

NX = note off

MSB = Most significant bit

LSB = Least significant bit

BB... = BeatBuddy specific commands (more detail below)

START = Send sysex start command (no MIDI channel required)

STOP = Send sysex stop command (no MIDI channel required)

While this looks quite complicated, it makes more sense to break it down and show some examples.  Note that the values {0-127} are based on computer numbering that starts at 0 rather than 1.  So the first value is 0.  I've chosen to keep MIDI channels as human numbering starting at 1 and ending at 16!

All MIDI shorthand code must start with MIDI (unless it is inline MIDI code, in which case it starts with ;MIDI).  Next is the MIDI channel number, then a colon :.  Multiple messages can be added by adding them as new lines.

If you wanted to make sure all connected MIDI devices that play music are stopped, you would use the command

;MIDI:STOP

Suppose you want to send a program change on MIDI channel 5 to select the first instrument available (number 0).

;MIDI5:PC0

Next you want to send a MIDI note for middle C (numeric value of 60) on MIDI channel 1 to play at a volume/velocity of 100.

;MIDI1:NO60:100

Next you want to send a MIDI controller message to a BeatBuddy pedal to trigger the device to start playing.  The user manual for this suggests  a control change value of 114 and using a value greater than 0 (so we'll use 1).  The BeatBuddy defaults to listen to any MIDI channel, but let's send this on MIDI channel 8:

;MIDI8:CC114:1

Most MIDI devices will help you decide which MIDI message type is required for each type of action if you check your device manual.  PC messages are usually used to pick instruments, patches, songs, etc.  CC messages are usually used to change settings or trigger specific actions.  MSB/LSB values are not used as often, but when they are, they are often used as a pair of messages, commonly for folder/song selection.  MIDI shorthand cannot be used for SYSEX MIDI commands, but standard  hexadecimal 0xF0 ......... 0xF7 commands  can be used.

As an example in your song, imagine you wanted to change the instrument using a program change on a connected MIDI keyboard when you click on a verse and then on a chorus in a song.  We'll use MIDI channel 2 in this example:

[V1]

;MIDI2:PC0

.G       D               Em

 This is line one of the verse...


[C]

;MIDI2:PC1

.G       C           G   D

 This is line one of the chorus...

Specific BeatBuddy shorthand MIDI commands

To save some of the pain of trying to work out the specific CC MIDI messages from the BeatBuddy manual, I've included some recognised shortcuts - they can be easily spotted because they all start with BB:

Transitions

BBT{1-32} = Transition to a chosen part number

BBTX = Exit the transition fill and move to the part (should be called immediately after the above)

BBTN = Transition to the next part (also call BBTX afterwards)

BBTP = Transition to the previous part (also call BBTX afterwards)

BBTE{1-32} = Exclusive transition to a chosen part number (exclusive means that it wont affect connected Aeros Loop pedals)

BBTEX = Exit the exclusive transition fill and move to the part (should be called immediately after the above).

BBTEN =  Exclusive transition to the next part

BBTEP = Exclusive transition to the previous part

Timing changes

BBH = Switch to half time playback

BBHX = Exit half time playback (and return to normal time)

BBD = Switch to double time playback

BBDX = Exit double time playback (and return to normal time)

BBBPM{40-300} = Tempo change

Song changes and output

BBV{0-100} = Change the output volume

BBS{1-127}/{1-127} = Load a folder/song.  Both folder number and song are required.  While the folder number can go way higher than 127, this would not work if your device is set to Aeros mode

BBI = Play the intro (start the song)

BBO = Play the outro (end the song)

BBP = Pause/unpause the playback (each time this is used, it toggles the setting)

BBF = Play a fill

BBA = Play an accent note

For example, if you want the BeatBuddy to transition to part 2 when you click on the chorus section, you would use the following code inside the chorus tag in the song (assuming we are using MIDI channel 1):

[C]

;MIDI1:BBT2

;MIDI1:BBTX

.G       C           G   D

 This is line one of the chorus...

MIDI HEX Code

OpenSongApp will send any MIDI message that can be represented as a hexadecimal string.  Whilst this can be complex,  it is possible to understand it.  You can also use some of the spreadsheets below to help you build code for specific devices.  It you want to enter hexadecimal code for MIDI messages, you should enter this in the Edit Song > Features tab.

Predefined MIDI message helpers are as follows.

Sending MIDI messages

Once you have connected your MIDI device, you can test the connection by clicking on the TEST button directly underneath the device name.  This will send the following 3 MIDI messages to the connected device:

Once you are connected, you can build and test your custom MIDI messages using the drop down menus.  The TEST button underneath this section sends the MIDI message currently chosen to connected devices.

You can also enter and test any midi code (including Sysex) by manually copying it from a device manual or text editor.  The diagram above can help explain how the MIDI code is built up.  Each block starts with 0x which defines it as a hexadecimal integer.  Without this, the message would throw an error.

For example, the midi message 0xB1 0x07 0x7F would send a Controller change (0xB1) message on MIDI channel 2 (0xB1) with the controller number 7 (0x07), which is often the volume controller and with a value of 127 (0xFF), the highest value.

Sysex messages always start with 0xF0 and end with 0xF7 and can have any quantity of hexadecimal numbers in between.  These can end up being extremely large messages and take a while to be sent/received.

Korg arranger midi code builder for songbook

If you use a Korg arranger, you can use the following Google Sheet to generate the MIDI code to tell the arranger which song to load when you open it in OpenSongApp.

The Google Sheet is shared with view permissions.  If you want to make your own copy that you can edit, use the File > Make a copy option.

Korg arranger midi code builder for songbook

BeatBuddy code generator

Long time user and contributor Alistair has created the following Spreadsheet to help generate and keep a record of song settings for his BeatBuddy.  

I've converted this to a Google Sheet so it is accessible online.  You can view the file below, and you can then make your own copy if you find it useful (use the File > Make a copy option).

There is also a BeatBuddy helper in the Settings > Utilities > BeatBuddy page

BeatBuddy OpenSong Midi