FREE worldwide shipping on orders over $200.

MIDI Technical Reference

A comprehensive technical reference based on MIDI 1.0 specification, covering message types, Control Change, SysEx protocol, and hardware connectivity. Written for LdA device users.

1. MIDI Overview

MIDI (Musical Instrument Digital Interface) is the international standard protocol for communication between electronic musical instruments, first released by the MMA and AMEI in 1983. MIDI transmits performance data — not audio — such as which note was played, how hard, and how far a knob was turned.

MIDI uses asynchronous serial communication at 31.25 Kbaud (±1%), with 1 start bit, 8 data bits, and 1 stop bit per byte (10 bits total, 320 µs). Data travels as a 5mA current loop, with opto-isolation providing electrical isolation between devices.

2. Message Types

MessageStatus ByteData BytesDescription
Note Off0x80-0x8FNote, VelocityNote released
Note On0x90-0x9FNote, VelocityNote pressed (Velocity=0 = Note Off)
Poly Aftertouch0xA0-0xAFNote, PressurePer-key pressure
Control Change0xB0-0xBFCC#, ValueController change, CC#120-127 are Channel Mode
Program Change0xC0-0xCFProgram #Patch/preset change
Channel Aftertouch0xD0-0xDFPressureChannel-wide pressure
Pitch Bend0xE0-0xEFLSB, MSB14-bit pitch bend (center=0x2000)
System Exclusive0xF0Manufacturer ID + DataVendor-defined, ends with 0xF7
Timing Clock0xF8None24 pulses per quarter note
Start / Stop / Continue0xFA / 0xFC / 0xFBNoneReal-time transport control
Active Sensing0xFENoneConnection keep-alive (every 300ms)

Note: The low 4 bits (nnnn) of status bytes indicate MIDI channel 0-15 → channel 1-16.

3. CC Reference

Control Change messages use status bytes 0xB0-0xBF (channels 1-16), followed by a CC number (0-127) and value (0-127). CC#120-127 are reserved for Channel Mode messages. Below are the key CC numbers defined in the MIDI 1.0 specification.

CC#NameRangeType
0Bank Select0-127MSB
1Modulation Wheel0-127MSB
2Breath Controller0-127MSB
4Foot Controller0-127MSB
5Portamento Time0-127MSB
6Data Entry0-127MSB
7Channel Volume0-127MSB
8Balance0-127MSB
10Pan0-127MSB
11Expression0-127MSB
12Effect Control 10-127MSB
13Effect Control 20-127MSB
16General Purpose 10-127MSB
17General Purpose 20-127MSB
18General Purpose 30-127MSB
19General Purpose 40-127MSB
32Bank Select LSB0-127LSB
38Data Entry LSB0-127LSB
64Damper Pedal (Sustain)0-63=Off, 64-127=OnSwitch
65Portamento On/Off0-63=Off, 64-127=OnSwitch
66Sostenuto0-63=Off, 64-127=OnSwitch
67Soft Pedal0-63=Off, 64-127=OnSwitch
70Sound Controller 10-127LSB
71Sound Controller 20-127LSB
72Sound Controller 3 (Release)0-127LSB
73Sound Controller 4 (Attack)0-127LSB
74Sound Controller 5 (Brightness)0-127LSB
80General Purpose 50-127LSB
81General Purpose 60-127LSB
82General Purpose 70-127LSB
83General Purpose 80-127LSB
91Reverb Send Level0-127MSB
93Chorus Send Level0-127MSB
98NRPN LSB0-127LSB
99NRPN MSB0-127MSB
100RPN LSB0-127LSB
101RPN MSB0-127MSB
120All Sound Off0Mode
121Reset All Controllers0Mode
122Local Control0=Off, 127=OnMode
123All Notes Off0Mode
124Omni Mode Off0Mode
125Omni Mode On0Mode
126Mono Mode On0-16Mode
127Poly Mode On0Mode

4. SysEx Guide

4.1 SysEx Message Format

System Exclusive (SysEx) is the MIDI protocol mechanism for manufacturer-custom communication. Each SysEx message starts with 0xF0 and ends with 0xF7, carrying a manufacturer ID and custom data in between. LdA uses the temporary manufacturer ID 0x7D.

┌──────┬──────────┬────────┬────────┬────────────┬────────┬──────┐ │ 0xF0 │ Maker ID │Dev ID │ Command│ Data │ Checksum│ 0xF7 │ │ Start│ (1 byte) │(1 byte)│(1 byte)│ (N bytes) │ (1 byte)│ End │ └──────┴──────────┴────────┴────────┴────────────┴────────┴──────┘

Field Descriptions

FieldBytesDescription
Start10xF0 — SysEx start
Maker ID10x7D — LdA temporary ID
Dev ID10x01=MS-3, 0x02=LS-4p3, 0xFF=broadcast
Command1Command number
Data0-NCommand data
Checksum1XOR: Maker ID ⊕ Dev ID ⊕ Command ⊕ Data[0..N-1]
End10xF7 — SysEx end

4.2 Checksum Algorithm

uint8_t checksum = maker_id ^ dev_id ^ cmd;
for (int i = 0; i < data_len; i++) {
    checksum ^= data[i];
}

4.3 Response Format

Devices respond to commands with a response message. ResponseCode = Command | 0x80 (setting the MSB indicates a response).

F0 7D [DevID] [ResponseCode] [ResponseData] [Checksum] F7

4.4 Error Responses

ErrorCodeMeaning
0x01Command not supported
0x02Invalid data format
0x03Checksum mismatch
0x04Device busy
0x05Storage error

4.5 Command Set Overview

RangeCategoryExample Commands
0x00-0x0FSystem0x00=Firmware, 0x01=Device Info, 0x04=Ping
0x10-0x1FPreset Management0x10=Read, 0x11=Write, 0x13=Switch, 0x14=Backup
0x20-0x2FMIDI Control0x20=Send MIDI, 0x21=Configure Preset MIDI
0x30-0x3FLoop Control0x30=Read Loops, 0x31=Toggle Loop, 0x32=Set All
0x40-0x4FSystem Config0x40=Read Config, 0x42=Read MIDI Channel
0xF0-0xFFFirmware Update0xF0=Enter Bootloader, 0xF3=Data Block

4.6 Example: Query Firmware (0x00)

Send:

F0 7D 01 00 [Checksum] F7

Response (firmware v1.2.3):

F0 7D 01 80 01 02 03 00 [Checksum] F7

ResponseCode = 0x80 (0x00 | 0x80), Data = Major.Minor.Patch.Build

4.7 Example: Toggle Loop 2 On (0x31)

F0 7D 01 31 02 7F [Checksum] F7; LoopNum=2, State=0x7F (on)

5. MS-3 MIDI Implementation

The MS-3 supports standard MIDI messages and SysEx protocol. Connect via USB-C or 5-pin DIN to switch presets with Program Change, control loops with Control Change, and manage preset data and system configuration via SysEx.

MS-3 Custom CC Mapping

CC#FunctionDescription
0Bank Select MSBPreset bank switch
32Bank Select LSBPreset bank select LSB
80Loop 10-63=Off, 64-127=On
81Loop 20-63=Off, 64-127=On
82Loop 30-63=Off, 64-127=On
90Tap TempoTap 3 times to set BPM
91Global TapGlobal tap tempo
102Preset UpNext preset
103Preset DownPrevious preset
120All Sound OffMute all
123All Notes OffAll notes off

Program Change Preset Mapping

PC 1-100
→ Presets 1-100
PC 127
→ Bypass mode (all loops off)

6. Hardware Connectivity

6.1 MIDI Physical Interface

InterfaceSpecNotes
5-pin DIN31.25 Kbaud, 5mA current loopMIDI 1.0 standard, opto-isolated, max 15m
USB-CUSB MIDI Class CompliantDriverless, plug-and-play on macOS/Windows 10+
TRS (3.5mm)TRS MIDI (MMA RP-054)Type A adapter (MMA standard), some devices may need Type B

6.2 Web MIDI API Integration

Modern browsers support MIDI communication via the Web MIDI API. Here's a JavaScript integration example for LdA devices:

// Request MIDI access with SysEx support
const midi = await navigator.requestMIDIAccess({ sysex: true });

// Send SysEx to LdA device (e.g., query firmware)
function sendSysex(output, makerId, devId, cmd, data = []) {
  const checksum = [makerId, devId, cmd, ...data]
    .reduce((a, b) => a ^ b, 0);
  const msg = new Uint8Array([
    0xF0, makerId, devId, cmd, ...data, checksum, 0xF7
  ]);
  output.send(msg);
}

// Listen for MIDI input
input.onmidimessage = (event) => {
  const [status, ...rest] = event.data;
  if (status === 0xF0) {
    // SysEx received
    const [makerId, devId, responseCode, ...data] = rest;
    const cmd = responseCode & 0x7F;
    console.log('Response to cmd', cmd.toString(16), data);
  }
};

Note: Chrome/Edge support Web MIDI API. Safari/Firefox require manual enabling or third-party extensions.