LMMS
Loading...
Searching...
No Matches
midi.h File Reference
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Macros

#define LV2_MIDI_URI   "http://lv2plug.in/ns/ext/midi"
 http://lv2plug.in/ns/ext/midi
#define LV2_MIDI_PREFIX   LV2_MIDI_URI "#"
 http://lv2plug.in/ns/ext/midi#
#define LV2_MIDI__ActiveSense   LV2_MIDI_PREFIX "ActiveSense"
 http://lv2plug.in/ns/ext/midi#ActiveSense
#define LV2_MIDI__Aftertouch   LV2_MIDI_PREFIX "Aftertouch"
 http://lv2plug.in/ns/ext/midi#Aftertouch
#define LV2_MIDI__Bender   LV2_MIDI_PREFIX "Bender"
 http://lv2plug.in/ns/ext/midi#Bender
#define LV2_MIDI__ChannelPressure   LV2_MIDI_PREFIX "ChannelPressure"
 http://lv2plug.in/ns/ext/midi#ChannelPressure
#define LV2_MIDI__Chunk   LV2_MIDI_PREFIX "Chunk"
 http://lv2plug.in/ns/ext/midi#Chunk
#define LV2_MIDI__Clock   LV2_MIDI_PREFIX "Clock"
 http://lv2plug.in/ns/ext/midi#Clock
#define LV2_MIDI__Continue   LV2_MIDI_PREFIX "Continue"
 http://lv2plug.in/ns/ext/midi#Continue
#define LV2_MIDI__Controller   LV2_MIDI_PREFIX "Controller"
 http://lv2plug.in/ns/ext/midi#Controller
#define LV2_MIDI__MidiEvent   LV2_MIDI_PREFIX "MidiEvent"
 http://lv2plug.in/ns/ext/midi#MidiEvent
#define LV2_MIDI__NoteOff   LV2_MIDI_PREFIX "NoteOff"
 http://lv2plug.in/ns/ext/midi#NoteOff
#define LV2_MIDI__NoteOn   LV2_MIDI_PREFIX "NoteOn"
 http://lv2plug.in/ns/ext/midi#NoteOn
#define LV2_MIDI__ProgramChange   LV2_MIDI_PREFIX "ProgramChange"
 http://lv2plug.in/ns/ext/midi#ProgramChange
#define LV2_MIDI__QuarterFrame   LV2_MIDI_PREFIX "QuarterFrame"
 http://lv2plug.in/ns/ext/midi#QuarterFrame
#define LV2_MIDI__Reset   LV2_MIDI_PREFIX "Reset"
 http://lv2plug.in/ns/ext/midi#Reset
#define LV2_MIDI__SongPosition   LV2_MIDI_PREFIX "SongPosition"
 http://lv2plug.in/ns/ext/midi#SongPosition
#define LV2_MIDI__SongSelect   LV2_MIDI_PREFIX "SongSelect"
 http://lv2plug.in/ns/ext/midi#SongSelect
#define LV2_MIDI__Start   LV2_MIDI_PREFIX "Start"
 http://lv2plug.in/ns/ext/midi#Start
#define LV2_MIDI__Stop   LV2_MIDI_PREFIX "Stop"
 http://lv2plug.in/ns/ext/midi#Stop
#define LV2_MIDI__SystemCommon   LV2_MIDI_PREFIX "SystemCommon"
 http://lv2plug.in/ns/ext/midi#SystemCommon
#define LV2_MIDI__SystemExclusive   LV2_MIDI_PREFIX "SystemExclusive"
 http://lv2plug.in/ns/ext/midi#SystemExclusive
#define LV2_MIDI__SystemMessage   LV2_MIDI_PREFIX "SystemMessage"
 http://lv2plug.in/ns/ext/midi#SystemMessage
#define LV2_MIDI__SystemRealtime   LV2_MIDI_PREFIX "SystemRealtime"
 http://lv2plug.in/ns/ext/midi#SystemRealtime
#define LV2_MIDI__Tick   LV2_MIDI_PREFIX "Tick"
 http://lv2plug.in/ns/ext/midi#Tick
#define LV2_MIDI__TuneRequest   LV2_MIDI_PREFIX "TuneRequest"
 http://lv2plug.in/ns/ext/midi#TuneRequest
#define LV2_MIDI__VoiceMessage   LV2_MIDI_PREFIX "VoiceMessage"
 http://lv2plug.in/ns/ext/midi#VoiceMessage
#define LV2_MIDI__benderValue   LV2_MIDI_PREFIX "benderValue"
 http://lv2plug.in/ns/ext/midi#benderValue
#define LV2_MIDI__binding   LV2_MIDI_PREFIX "binding"
 http://lv2plug.in/ns/ext/midi#binding
#define LV2_MIDI__byteNumber   LV2_MIDI_PREFIX "byteNumber"
 http://lv2plug.in/ns/ext/midi#byteNumber
#define LV2_MIDI__channel   LV2_MIDI_PREFIX "channel"
 http://lv2plug.in/ns/ext/midi#channel
#define LV2_MIDI__chunk   LV2_MIDI_PREFIX "chunk"
 http://lv2plug.in/ns/ext/midi#chunk
#define LV2_MIDI__controllerNumber   LV2_MIDI_PREFIX "controllerNumber"
 http://lv2plug.in/ns/ext/midi#controllerNumber
#define LV2_MIDI__controllerValue   LV2_MIDI_PREFIX "controllerValue"
 http://lv2plug.in/ns/ext/midi#controllerValue
#define LV2_MIDI__noteNumber   LV2_MIDI_PREFIX "noteNumber"
 http://lv2plug.in/ns/ext/midi#noteNumber
#define LV2_MIDI__pressure   LV2_MIDI_PREFIX "pressure"
 http://lv2plug.in/ns/ext/midi#pressure
#define LV2_MIDI__programNumber   LV2_MIDI_PREFIX "programNumber"
 http://lv2plug.in/ns/ext/midi#programNumber
#define LV2_MIDI__property   LV2_MIDI_PREFIX "property"
 http://lv2plug.in/ns/ext/midi#property
#define LV2_MIDI__songNumber   LV2_MIDI_PREFIX "songNumber"
 http://lv2plug.in/ns/ext/midi#songNumber
#define LV2_MIDI__songPosition   LV2_MIDI_PREFIX "songPosition"
 http://lv2plug.in/ns/ext/midi#songPosition
#define LV2_MIDI__status   LV2_MIDI_PREFIX "status"
 http://lv2plug.in/ns/ext/midi#status
#define LV2_MIDI__statusMask   LV2_MIDI_PREFIX "statusMask"
 http://lv2plug.in/ns/ext/midi#statusMask
#define LV2_MIDI__velocity   LV2_MIDI_PREFIX "velocity"
 http://lv2plug.in/ns/ext/midi#velocity

Enumerations

enum  LV2_Midi_Message_Type {
  LV2_MIDI_MSG_INVALID = 0 , LV2_MIDI_MSG_NOTE_OFF = 0x80 , LV2_MIDI_MSG_NOTE_ON = 0x90 , LV2_MIDI_MSG_NOTE_PRESSURE = 0xA0 ,
  LV2_MIDI_MSG_CONTROLLER = 0xB0 , LV2_MIDI_MSG_PGM_CHANGE = 0xC0 , LV2_MIDI_MSG_CHANNEL_PRESSURE = 0xD0 , LV2_MIDI_MSG_BENDER = 0xE0 ,
  LV2_MIDI_MSG_SYSTEM_EXCLUSIVE = 0xF0 , LV2_MIDI_MSG_MTC_QUARTER = 0xF1 , LV2_MIDI_MSG_SONG_POS = 0xF2 , LV2_MIDI_MSG_SONG_SELECT = 0xF3 ,
  LV2_MIDI_MSG_TUNE_REQUEST = 0xF6 , LV2_MIDI_MSG_CLOCK = 0xF8 , LV2_MIDI_MSG_START = 0xFA , LV2_MIDI_MSG_CONTINUE = 0xFB ,
  LV2_MIDI_MSG_STOP = 0xFC , LV2_MIDI_MSG_ACTIVE_SENSE = 0xFE , LV2_MIDI_MSG_RESET = 0xFF
}
enum  LV2_Midi_Controller {
  LV2_MIDI_CTL_MSB_BANK = 0x00 , LV2_MIDI_CTL_MSB_MODWHEEL = 0x01 , LV2_MIDI_CTL_MSB_BREATH = 0x02 , LV2_MIDI_CTL_MSB_FOOT = 0x04 ,
  LV2_MIDI_CTL_MSB_PORTAMENTO_TIME = 0x05 , LV2_MIDI_CTL_MSB_DATA_ENTRY = 0x06 , LV2_MIDI_CTL_MSB_MAIN_VOLUME = 0x07 , LV2_MIDI_CTL_MSB_BALANCE = 0x08 ,
  LV2_MIDI_CTL_MSB_PAN = 0x0A , LV2_MIDI_CTL_MSB_EXPRESSION = 0x0B , LV2_MIDI_CTL_MSB_EFFECT1 = 0x0C , LV2_MIDI_CTL_MSB_EFFECT2 = 0x0D ,
  LV2_MIDI_CTL_MSB_GENERAL_PURPOSE1 = 0x10 , LV2_MIDI_CTL_MSB_GENERAL_PURPOSE2 = 0x11 , LV2_MIDI_CTL_MSB_GENERAL_PURPOSE3 = 0x12 , LV2_MIDI_CTL_MSB_GENERAL_PURPOSE4 = 0x13 ,
  LV2_MIDI_CTL_LSB_BANK = 0x20 , LV2_MIDI_CTL_LSB_MODWHEEL = 0x21 , LV2_MIDI_CTL_LSB_BREATH = 0x22 , LV2_MIDI_CTL_LSB_FOOT = 0x24 ,
  LV2_MIDI_CTL_LSB_PORTAMENTO_TIME = 0x25 , LV2_MIDI_CTL_LSB_DATA_ENTRY = 0x26 , LV2_MIDI_CTL_LSB_MAIN_VOLUME = 0x27 , LV2_MIDI_CTL_LSB_BALANCE = 0x28 ,
  LV2_MIDI_CTL_LSB_PAN = 0x2A , LV2_MIDI_CTL_LSB_EXPRESSION = 0x2B , LV2_MIDI_CTL_LSB_EFFECT1 = 0x2C , LV2_MIDI_CTL_LSB_EFFECT2 = 0x2D ,
  LV2_MIDI_CTL_LSB_GENERAL_PURPOSE1 = 0x30 , LV2_MIDI_CTL_LSB_GENERAL_PURPOSE2 = 0x31 , LV2_MIDI_CTL_LSB_GENERAL_PURPOSE3 = 0x32 , LV2_MIDI_CTL_LSB_GENERAL_PURPOSE4 = 0x33 ,
  LV2_MIDI_CTL_SUSTAIN = 0x40 , LV2_MIDI_CTL_PORTAMENTO = 0x41 , LV2_MIDI_CTL_SOSTENUTO = 0x42 , LV2_MIDI_CTL_SOFT_PEDAL = 0x43 ,
  LV2_MIDI_CTL_LEGATO_FOOTSWITCH = 0x44 , LV2_MIDI_CTL_HOLD2 = 0x45 , LV2_MIDI_CTL_SC1_SOUND_VARIATION = 0x46 , LV2_MIDI_CTL_SC2_TIMBRE = 0x47 ,
  LV2_MIDI_CTL_SC3_RELEASE_TIME = 0x48 , LV2_MIDI_CTL_SC4_ATTACK_TIME = 0x49 , LV2_MIDI_CTL_SC5_BRIGHTNESS = 0x4A , LV2_MIDI_CTL_SC6 = 0x4B ,
  LV2_MIDI_CTL_SC7 = 0x4C , LV2_MIDI_CTL_SC8 = 0x4D , LV2_MIDI_CTL_SC9 = 0x4E , LV2_MIDI_CTL_SC10 = 0x4F ,
  LV2_MIDI_CTL_GENERAL_PURPOSE5 = 0x50 , LV2_MIDI_CTL_GENERAL_PURPOSE6 = 0x51 , LV2_MIDI_CTL_GENERAL_PURPOSE7 = 0x52 , LV2_MIDI_CTL_GENERAL_PURPOSE8 = 0x53 ,
  LV2_MIDI_CTL_PORTAMENTO_CONTROL = 0x54 , LV2_MIDI_CTL_E1_REVERB_DEPTH = 0x5B , LV2_MIDI_CTL_E2_TREMOLO_DEPTH = 0x5C , LV2_MIDI_CTL_E3_CHORUS_DEPTH = 0x5D ,
  LV2_MIDI_CTL_E4_DETUNE_DEPTH = 0x5E , LV2_MIDI_CTL_E5_PHASER_DEPTH = 0x5F , LV2_MIDI_CTL_DATA_INCREMENT = 0x60 , LV2_MIDI_CTL_DATA_DECREMENT = 0x61 ,
  LV2_MIDI_CTL_NRPN_LSB = 0x62 , LV2_MIDI_CTL_NRPN_MSB = 0x63 , LV2_MIDI_CTL_RPN_LSB = 0x64 , LV2_MIDI_CTL_RPN_MSB = 0x65 ,
  LV2_MIDI_CTL_ALL_SOUNDS_OFF = 0x78 , LV2_MIDI_CTL_RESET_CONTROLLERS = 0x79 , LV2_MIDI_CTL_LOCAL_CONTROL_SWITCH = 0x7A , LV2_MIDI_CTL_ALL_NOTES_OFF = 0x7B ,
  LV2_MIDI_CTL_OMNI_OFF = 0x7C , LV2_MIDI_CTL_OMNI_ON = 0x7D , LV2_MIDI_CTL_MONO1 = 0x7E , LV2_MIDI_CTL_MONO2 = 0x7F
}

Functions

static bool lv2_midi_is_voice_message (const uint8_t *msg)
static bool lv2_midi_is_system_message (const uint8_t *msg)
static LV2_Midi_Message_Type lv2_midi_message_type (const uint8_t *msg)