Version 9, last updated by hi-pi at Jan 22 02:54 2009 UTC
API Midi Protocol
Overview
The API offered by Live only provides support for receiving Midi Note, Midi CC and PitchBend data, fortunately there are no such limitations on the outgoing side so we currently use Sysex for all outgoing data.
Note: Live numbers the midi channels starting from 0, so incoming channel 1 is channel 0 in live.
| Request | Channel | CC Parameter | CC Value | Comments |
| Fire Clip | 0 | Track Index | Scene Index | |
| Get Clip Data | 1 | Track Index | Scene Index | |
| Monitor Clip | 2 | Track Index | Scene Index | |
| Stop Clip Monitor | 3 | Track Index | Scene Index | |
|
Get Track Data |
4 | 1 | Track Index | |
| Monitor Track | 4 | 2 | Track Index | |
| Stop Track Monitor | 4 | 3 | Track Index | |
| Get Song Data | 4 | 0 | Ignored | |
|
Get Scene Data |
4 | 10 | Scene Index | |
| Monitor Scene | 4 | 11 | Scene Index | |
| Stop Scene Monitor | 4 | 12 | Scene Index | |
| Trigger Scene | 4 | 13 | Scene Index | |
| Get Mixer Data | 4 | 20 | Track Index | Not Implemented |
| Get CuePoint Data | 4 | 30 | CuePoint Index | |
| Monitor CuePoint | 4 | 31 | CuePoint Index | |
| Stop Monitor CuePoint | 4 | 32 | CuePoint Index | |
| Trigger CuePoint | 4 | 33 | CuePoint Index |
| Response Type |
Status Byte | Data | Comments |
| Information | 0 | Ascii String | General notifications |
| Clip Data | 1 | ClipData | See Clip Data section below |
| Empty Clip Slot | 2 | Track Index, Scene Index | Requested slot has no clip |
| Clip is_triggered | 3 | Boolean | is_triggered change message |
| Clip is_playing | 4 | Boolean | is_playing change message |
| Clip name | 5 | Ascii String | name change message |
| Clip is_looping | 6 | Boolean | is_looping change message |
| Track Data | 10 | TrackData | See Track Data section |
| No Track Data | 11 | Track Index | Requested track doesnt exist |
| Track name | 12 | Ascii String | name change |
| Track is_armed | 13 | Boolean | is_armed change |
| Track is_muted | 14 | Boolean | is_muted change |
| Track is_soloed | 15 | Boolean | is_soloed change |
| Device Data | 20 | DeviceData | Not yet implemented |
| No Device Data | 21 | Device UID | Not yet implemented |
| Scene Data | 30 | Scene Index, Name | |
| No Scene Data | 31 | Scene Index | Scene doesnt exist |
| Scene name | 32 | Ascii String | name change message |
| Cuepoint Data | 40 | CuePointData | |
| No Cuepoint Data | 41 | Cuepoint Index | |
| CuePoint Name | 42 | Ascii String | |
| CuePoint Time | 43 | Not yet implemented | |
| Mixer Data | 50 | MixerData | Not yet implemented |
| No Mixer Data | 51 | Track Index | Not yet implemented |
| Song Data | 60 | SongData | See SongData section |
Outgoing Overview
All the outgoing data is Sysex. This means the first byte is the sysex header : 240 and the last byte is the end-of-message byte : 247
The first byte after the header is the status byte which says what type of data is in the rest of the packet. Refer to the table above for the status byte values.
ClipSlot Data
The first two bytes after the status byte are Track Index and Scene Index.
The next byte is a bit field where each bit is mapped to a boolean attribute of the clip
| Bit (0 based) | Attribute |
| 0 | is_audio / is_midi. On means audio, Off means midi |
| 1 | is_triggered |
| 2 | is_playing |
| 3 | looping |
| 4 | warping (only valid for audio clips) |
| 5 | muted |
The rest of the data is the clip name as ASCII.
Track Data
The first byte after the status byte is the Track Index.
The next byte is a bit field where each bit is mapped to a boolean attribute of the track
| Bit | Attribute |
| 0 | solo |
| 1 | mute |
| 2 | can_be_armed |
| 3 | arm |
The rest of the data is the track name as ASCII.
Song Data
First byte is a bitfield :
| Bit | Attribute |
| 0 | is_playing |
| 1 | metronome |
| 2 | overdub |
| 3 | punch_in |
| 4 | punch_out |
| 5 | record mode |
track count (7-bit)
scene count (7-bit)
cue point count (7-bit)
Time signature denominator
Time signature numerator
Ascii Name