41#define MIDI_LIBRARY_VERSION 0x050000
42#define MIDI_LIBRARY_VERSION_MAJOR 5
43#define MIDI_LIBRARY_VERSION_MINOR 0
44#define MIDI_LIBRARY_VERSION_PATCH 0
53template<
class Transport,
class _Settings = DefaultSettings,
class _Platform = DefaultPlatform>
92 Channel inChannel) __attribute__ ((deprecated));
102 bool inArrayContainsBoundaries =
false);
124 inline void beginRpn(
unsigned inNumber,
172 inline bool check()
const;
300 bool inFlipHeaderBits =
false);
304 bool inFlipHeaderBits =
false);
unsigned encodeSysEx(const byte *inData, byte *outSysEx, unsigned inLength, bool inFlipHeaderBits=false)
Encode System Exclusive messages. SysEx messages are encoded to guarantee transmission of data bytes ...
unsigned decodeSysEx(const byte *inSysEx, byte *outData, unsigned inLength, bool inFlipHeaderBits=false)
Decode System Exclusive messages. SysEx messages are encoded to guarantee transmission of data bytes ...
MIDI Library for the Arduino - Inline implementations.
StatusByte mRunningStatus_RX
~MidiInterface()
Destructor for MidiInterface.
void setHandleClock(ClockCallback fptr)
ContinueCallback mContinueCallback
AfterTouchPolyCallback mAfterTouchPolyCallback
unsigned long mLastMessageReceivedTime
void setHandleNoteOff(NoteOffCallback fptr)
Message< Settings::SysExMaxSize > MidiMessage
void setHandleSystemReset(SystemResetCallback fptr)
ActiveSensingCallback mActiveSensingCallback
StatusByte getStatus(MidiType inType, Channel inChannel) const
TimeCodeQuarterFrameCallback mTimeCodeQuarterFrameCallback
ControlChangeCallback mControlChangeCallback
void setHandleProgramChange(ProgramChangeCallback fptr)
void(* mMessageCallback)(const MidiMessage &message)
void setHandleNoteOn(NoteOnCallback fptr)
void setHandleControlChange(ControlChangeCallback fptr)
TickCallback mTickCallback
ErrorCallback mErrorCallback
unsigned mPendingMessageExpectedLength
void setHandleMessage(void(*fptr)(const MidiMessage &))
void setHandleStart(StartCallback fptr)
TuneRequestCallback mTuneRequestCallback
ClockCallback mClockCallback
void setHandleTick(TickCallback fptr)
SongSelectCallback mSongSelectCallback
StopCallback mStopCallback
bool mReceiverActiveSensingActivated
void setHandleActiveSensing(ActiveSensingCallback fptr)
void setHandleSystemExclusive(SystemExclusiveCallback fptr)
NoteOnCallback mNoteOnCallback
void thruFilter(byte inChannel)
unsigned mCurrentNrpnNumber
void setHandleStop(StopCallback fptr)
unsigned long mLastMessageSentTime
void setHandleError(ErrorCallback fptr)
void setHandleSongPosition(SongPositionCallback fptr)
void setHandleAfterTouchPoly(AfterTouchPolyCallback fptr)
MidiInterface(Transport &)
Constructor for MidiInterface.
SongPositionCallback mSongPositionCallback
AfterTouchChannelCallback mAfterTouchChannelCallback
SystemResetCallback mSystemResetCallback
void setHandleTimeCodeQuarterFrame(TimeCodeQuarterFrameCallback fptr)
StartCallback mStartCallback
unsigned mPendingMessageIndex
void setHandleTuneRequest(TuneRequestCallback fptr)
Transport * getTransport()
Thru::Mode mThruFilterMode
SystemExclusiveCallback mSystemExclusiveCallback
ProgramChangeCallback mProgramChangeCallback
void setHandleAfterTouchChannel(AfterTouchChannelCallback fptr)
unsigned long mSenderActiveSensingPeriodicity
void setHandleSongSelect(SongSelectCallback fptr)
void setHandleContinue(ContinueCallback fptr)
void setHandlePitchBend(PitchBendCallback fptr)
void begin(Channel inChannel=1)
Call the begin method in the setup() function of the Arduino.
StatusByte mRunningStatus_TX
PitchBendCallback mPitchBendCallback
unsigned mCurrentRpnNumber
NoteOffCallback mNoteOffCallback
void sendNrpnIncrement(byte inAmount, Channel inChannel)
void sendRpnIncrement(byte inAmount, Channel inChannel)
void sendAfterTouch(DataByte inPressure, Channel inChannel)
Send a MonoPhonic AfterTouch message (applies to all notes)
void sendNrpnDecrement(byte inAmount, Channel inChannel)
void endRpn(Channel inChannel)
Terminate an RPN frame. This will send a Null Function to deselect the currently selected RPN.
void sendPitchBend(int inPitchValue, Channel inChannel)
Send a Pitch Bend message using a signed integer value.
void sendTimeCodeQuarterFrame(DataByte inTypeNibble, DataByte inValuesNibble)
Send a MIDI Time Code Quarter Frame.
void endNrpn(Channel inChannel)
Terminate an NRPN frame. This will send a Null Function to deselect the currently selected NRPN.
void sendNoteOn(DataByte inNoteNumber, DataByte inVelocity, Channel inChannel)
Send a Note On message.
void sendTuneRequest()
Send a Tune Request message.
void sendControlChange(DataByte inControlNumber, DataByte inControlValue, Channel inChannel)
Send a Control Change message.
void send(const MidiMessage &)
Send a MIDI message.
void sendProgramChange(DataByte inProgramNumber, Channel inChannel)
Send a Program Change message.
void beginNrpn(unsigned inNumber, Channel inChannel)
Start a Non-Registered Parameter Number frame.
void beginRpn(unsigned inNumber, Channel inChannel)
Start a Registered Parameter Number frame.
void sendSongPosition(unsigned inBeats)
Send a Song Position Pointer message.
void sendPolyPressure(DataByte inNoteNumber, DataByte inPressure, Channel inChannel)
Send a Polyphonic AfterTouch message (applies to a specified note)
void sendSongSelect(DataByte inSongNumber)
Send a Song Select message.
void sendCommon(MidiType inType, unsigned=0)
Send a Common message. Common messages reset the running status.
void sendRpnDecrement(byte inAmount, Channel inChannel)
void sendRpnValue(unsigned inValue, Channel inChannel)
Send a 14-bit value for the currently selected RPN number.
void sendRealTime(MidiType inType)
Send a Real Time (one byte) message.
void sendSysEx(unsigned inLength, const byte *inArray, bool inArrayContainsBoundaries=false)
Generate and send a System Exclusive frame.
void sendNoteOff(DataByte inNoteNumber, DataByte inVelocity, Channel inChannel)
Send a Note Off message.
void sendNrpnValue(unsigned inValue, Channel inChannel)
Send a 14-bit value for the currently selected NRPN number.
void turnThruOn(Thru::Mode inThruFilterMode=Thru::Full)
Thru::Mode getFilterMode() const
void UpdateLastSentTime()
bool getThruState() const
void setThruFilterMode(Thru::Mode inThruFilterMode)
Set the filter for thru mirroring.
void(*)(Channel channel, byte note, byte velocity) NoteOnCallback
void(*)(int8_t) ErrorCallback
void(*)(void) ActiveSensingCallback
void(*)(void) StopCallback
void(*)(Channel channel, byte) ProgramChangeCallback
void(*)(Channel channel, byte note, byte velocity) AfterTouchPolyCallback
void(*)(Channel channel, byte, byte) ControlChangeCallback
void(*)(Channel channel, byte) AfterTouchChannelCallback
void(*)(void) TickCallback
void(*)(byte *array, unsigned size) SystemExclusiveCallback
void(*)(void) TuneRequestCallback
void(*)(void) ContinueCallback
void(*)(void) SystemResetCallback
@ Continue
System Real Time - Continue.
@ Clock
System Real Time - Timing Clock.
@ ActiveSensing
System Real Time - Active Sensing.
@ SystemReset
System Real Time - System Reset.
@ Tick
System Real Time - Timing Tick (1 tick = 10 milliseconds)
@ Start
System Real Time - Start.
@ Stop
System Real Time - Stop.
void(*)(Channel channel, byte note, byte velocity) NoteOffCallback
void(*)(void) StartCallback
void(*)(byte songnumber) SongSelectCallback
void(*)(byte data) TimeCodeQuarterFrameCallback
void(*)(unsigned beats) SongPositionCallback
void(*)(void) ClockCallback
void(*)(Channel channel, int) PitchBendCallback
MIDI Library for the Arduino - Definitions.
MIDI Library for the Arduino - Message struct definition.
#define END_MIDI_NAMESPACE
#define BEGIN_MIDI_NAMESPACE
MIDI Library for the Arduino - Settings.
MIDI Library for the Arduino - Platform @license MIT - Copyright (c) 2015 Francois Best.
@ Full
Fully enabled Thru (every incoming message is sent back).