Manuals

MIDI CONVERSION TABLE

How does it work?

This guide helps you convert human-readable OSC messages into raw MIDI hex commands for triggering KLANG functions from external MIDI devices, such as mixing consoles. It focuses on Note OnProgram Change, and Control Change messages, showing you how to enter values in hex format and how they map to corresponding OSC paths used in KLANG. All numbers in the OSC paths use decimal notation, while the MIDI commands must be entered in hexadecimal on the MIDI device.

MIDI Note Messages /midi/note

KLANG’s OSC Style Notation

This is used in KLANG:app’s translator with numbers in decimal notation: 

  • /midi/note/<channel>/<noteNumber> i <velocity>
  • <channel> must be between 1 and 127
  • <noteNumber> must be between 0 and 127

Corresponding Raw MIDI command to be entered in console in Hex notation:

  • 0x89 + <channelInHex> 
  • <noteNumberInHex>
  • <velocityInHex>
KLANG’s OSC-style MIDI NotationRaw MIDI Hex MessageDescription
/midi/note/1/0 i 090 00 00
/midi/note/1/0 i 6390 00 7F
/midi/note/1/0 i 12790 00 7FNote On: C−2, Channel 1, Velocity 127
/midi/note/1/190 01 7FNote On: C♯−2, Channel 1
/midi/note/1/290 02 7FNote On: D−2, Channel 1
/midi/note/1/12790 7F 7FNote On: G9, Channel 1
/midi/note/2/091 00 7FNote On: C−2, Channel 2
/midi/note/2/12791 7F 7FNote On: G9, Channel 2
/midi/note/6/095 00 7FNote On: C−2, Channel 6
/midi/note/6/195 01 7FNote On: C♯−2, Channel 6
/midi/note/6/295 02 7FNote On: D−2, Channel 6
/midi/note/6/395 03 7FNote On: D♯−2, Channel 6
/midi/note/6/495 04 7FNote On: E−2, Channel 6
/midi/note/6/595 05 7FNote On: F−2, Channel 6
/midi/note/6/695 06 7FNote On: F♯−2, Channel 6
/midi/note/6/795 07 7FNote On: G−2, Channel 6
/midi/note/6/895 08 7FNote On: G♯−2, Channel 6
/midi/note/6/995 09 7FNote On: A−2, Channel 6
/midi/note/6/1095 0A 7FNote On: A♯−2, Channel 6
/midi/note/6/1195 0B 7FNote On: B−2, Channel 6
/midi/note/6/1295 0C 7FNote On: C−1, Channel 6
/midi/note/6/1395 0D 7FNote On: C♯−1, Channel 6
/midi/note/6/1495 0E 7FNote On: D−1, Channel 6
/midi/note/6/1595 0F 7FNote On: D♯−1, Channel 6
/midi/note/6/1695 10 7FNote On: E−1, Channel 6
/midi/note/6/1795 11 7FNote On: F−1, Channel 6

Example for OSCulator

In this example incoming MIDI messages to OSCulator (/midi/cc4/10 and/midi/cc16/10) are converted to /midi/note/

Control Change /midi/cc

KLANG’s OSC style notation

/midi/cc/<channel>/<command> i <value>

Raw Hex Notation

0xB<channel> <command> <value>

Example

/midi/cc/12/0 i 3
Controller Bank Select: 3 Channel 12
0xBB 0x00 0x03

Program Change /midi/pc

KLANG’s OSC style notation

/midi/pc/<channel>/<programNumber>

Raw Hex Notation

0xC<channel> <programNumberInHex>

Example

/midi/pc/12/100
Program change 100 Channel 12
0xCB 0x64

Decimal to Hexadecimal Conversion

Use this table to convert from Decimal numbers 1–127 to the hexadecimal representation for MIDI commands:

DecimalMIDI
Hexadecimal
DecimalMIDI
Hexadecimal
0006440
1016541
2026642
3036743
4046844
5056945
6067046
7077147
8087248
9097349
100A744A
110B754B
120C764C
130D774D
140E784E
150F794F
16108050
17118151
18128252
19138353
20148454
21158555
22168656
23178757
24188858
25198959
261A905A
271B915B
281C925C
291D935D
301E945E
311F955F
32209660
33219761
34229862
35239963
362410064
372510165
382610266
392710367
402810468
412910569
422A1066A
432B1076B
442C1086C
452D1096D
462E1106E
472F1116F
483011270
493111371
503211472
513311573
523411674
533511775
543611876
553711977
563812078
573912179
583A1227A
593B1237B
603C1247C
613D1257D
623E1267E
633F1277F

Command Line Tool

There are various tools to send MIDI messages, also from the command line. As an example, we just use sendmidi. It can be installed via brew on a Mac.

brew install gbevin/tools/sendmidi

Once installed, you can send MIDI messages from Terminal.

Example

We will send to the MIDI device called MIDI Control 1 on MIDI channel 3 the CC command 32 with value 63 (all values in decimal notation).

KLANG’s OSC style notation: /midi/cc/<channel>/<command> i <value>, i.e. /midi/cc/3/32 i 63:

sendmidi dev "MIDI Control 1" ch 3 cc 32 63

Still Have Questions?

Contact us here