43#define MIDI_CHANNEL_OMNI 0
44#define MIDI_CHANNEL_OFF 17
46#define MIDI_PITCHBEND_MIN -8192
47#define MIDI_PITCHBEND_MAX 8191
51static const uint16_t ActiveSensingTimeout = 300;
56typedef byte StatusByte;
59typedef byte FilterMode;
63static const uint8_t ErrorParse = 0;
64static const uint8_t ErrorActiveSensingTimeout = 1;
65static const uint8_t WarningSplitSysEx = 2;
70using ErrorCallback = void (*)(int8_t);
71using NoteOffCallback = void (*)(Channel channel,
byte note,
byte velocity);
72using NoteOnCallback = void (*)(Channel channel,
byte note,
byte velocity);
73using AfterTouchPolyCallback = void (*)(Channel channel,
byte note,
byte velocity);
74using ControlChangeCallback = void (*)(Channel channel, byte, byte);
75using ProgramChangeCallback = void (*)(Channel channel, byte);
76using AfterTouchChannelCallback = void (*)(Channel channel, byte);
77using PitchBendCallback = void (*)(Channel channel, int);
78using SystemExclusiveCallback = void (*)(
byte * array,
unsigned size);
79using TimeCodeQuarterFrameCallback = void (*)(
byte data);
80using SongPositionCallback = void (*)(
unsigned beats);
81using SongSelectCallback = void (*)(
byte songnumber);
82using TuneRequestCallback = void (*)(void);
83using ClockCallback = void (*)(void);
84using StartCallback = void (*)(void);
85using TickCallback = void (*)(void);
86using ContinueCallback = void (*)(void);
87using StopCallback = void (*)(void);
88using ActiveSensingCallback = void (*)(void);
89using SystemResetCallback = void (*)(void);
149 BreathController = 2,
158 ExpressionController = 11,
163 GeneralPurposeController1 = 16,
164 GeneralPurposeController2 = 17,
165 GeneralPurposeController3 = 18,
166 GeneralPurposeController4 = 19,
189 GeneralPurposeController5 = 80,
190 GeneralPurposeController6 = 81,
191 GeneralPurposeController7 = 82,
192 GeneralPurposeController8 = 83,
193 PortamentoControl = 84,
209 ResetAllControllers = 121,
220 enum RegisteredParameterNumbers: uint16_t
222 PitchBendSensitivity = 0x0000,
223 ChannelFineTuning = 0x0001,
224 ChannelCoarseTuning = 0x0002,
225 SelectTuningProgram = 0x0003,
226 SelectTuningBank = 0x0004,
227 ModulationDepthRange = 0x0005,
228 NullFunction = (0x7f << 7) + 0x7f,
MidiControlChangeNumber
Enumeration of Control Change command numbers. See the detailed controllers numbers & description her...
@ RPNLSB
Registered Parameter Number (LSB)
@ SoundController5
Synth: Brightness FX: Expander On/Off.
@ RPNMSB
Registered Parameter Number (MSB)
@ SoundController4
Synth: Attack Time FX: EQ On/Off.
@ NRPNLSB
Non-Registered Parameter Number (LSB)
@ SoundController9
Synth: Vibrato Delay FX: Flange/Chorus On/Off.
@ NRPNMSB
Non-Registered Parameter Number (MSB)
@ SoundController10
Synth: Undefined FX: Special Effects On/Off.
@ SoundController6
Synth: Decay Time FX: Reverb On/Off.
@ SoundController8
Synth: Vibrato Depth FX: Pitch Transpose On/Off.
@ Effects3
Chorus send level.
@ SoundController2
Synth: Harmonic Content FX: Compressor On/Off.
@ SoundController1
Synth: Sound Variation FX: Exciter On/Off.
@ SoundController7
Synth: Vibrato Rate FX: Delay On/Off.
@ Effects1
Reverb send level.
@ SoundController3
Synth: Release Time FX: Distortion On/Off.
@ AfterTouchChannel
Channel Message - Channel (monophonic) AfterTouch.
@ ProgramChange
Channel Message - Program Change.
@ SystemExclusiveStart
System Exclusive Start.
@ Continue
System Real Time - Continue.
@ Clock
System Real Time - Timing Clock.
@ ActiveSensing
System Real Time - Active Sensing.
@ SystemReset
System Real Time - System Reset.
@ SystemExclusive
System Exclusive.
@ InvalidType
For notifying errors.
@ SongPosition
System Common - Song Position Pointer.
@ Tick
System Real Time - Timing Tick (1 tick = 10 milliseconds)
@ TuneRequest
System Common - Tune Request.
@ Start
System Real Time - Start.
@ ControlChange
Channel Message - Control Change / Channel Mode.
@ PitchBend
Channel Message - Pitch Bend.
@ NoteOff
Channel Message - Note Off.
@ SongSelect
System Common - Song Select.
@ SystemExclusiveEnd
System Exclusive End.
@ AfterTouchPoly
Channel Message - Polyphonic AfterTouch.
@ Stop
System Real Time - Stop.
@ TimeCodeQuarterFrame
System Common - MIDI Time Code Quarter Frame.
@ NoteOn
Channel Message - Note On.
MIDI Library for the Arduino - Namespace declaration.
@ DifferentChannel
All the messages but the ones on the Input Channel will be sent back.
@ Full
Fully enabled Thru (every incoming message is sent back).
@ Off
Thru disabled (nothing passes through).
@ SameChannel
Only the messages on the Input Channel will be sent back.