template<class Transport, class _Settings = DefaultSettings, class _Platform = DefaultPlatform>
class MidiInterface< Transport, _Settings, _Platform >
The main class for MIDI handling. It is templated over the type of serial port to provide abstraction from the hardware interface, meaning you can use HardwareSerial, SoftwareSerial or ak47's Uart classes. The only requirement is that the class implements the begin, read, write and available methods.
Definition at line 54 of file MIDI.h.
|
| MidiInterface (Transport &) |
| Constructor for MidiInterface.
|
|
| ~MidiInterface () |
| Destructor for MidiInterface.
|
|
void | begin (Channel inChannel=1) |
| Call the begin method in the setup() function of the Arduino.
|
|
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.
|
|
bool | check () const |
| Check if a valid message is stored in the structure.
|
|
void | disconnectCallbackFromType (MidiType inType) |
| Detach an external function from the given type.
|
|
void | endNrpn (Channel inChannel) |
| Terminate an NRPN frame. This will send a Null Function to deselect the currently selected NRPN.
|
|
void | endRpn (Channel inChannel) |
| Terminate an RPN frame. This will send a Null Function to deselect the currently selected RPN.
|
|
Channel | getChannel () const |
| Get the channel of the message stored in the structure.
|
|
DataByte | getData1 () const |
| Get the first data byte of the last received message.
|
|
DataByte | getData2 () const |
| Get the second data byte of the last received message.
|
|
Thru::Mode | getFilterMode () const |
|
Channel | getInputChannel () const |
|
const byte * | getSysExArray () const |
| Get the System Exclusive byte array.
|
|
unsigned | getSysExArrayLength () const |
| Get the length of the System Exclusive array.
|
|
bool | getThruState () const |
|
Transport * | getTransport () |
|
MidiType | getType () const |
| Get the last received message's type.
|
|
bool | read () |
| Read messages from the serial port using the main input channel.
|
|
bool | read (Channel inChannel) |
| Read messages on a specified channel.
|
|
void | send (const MidiMessage &) |
| Send a MIDI message.
|
|
void | send (MidiType inType, DataByte inData1, DataByte inData2, Channel inChannel) |
| Generate and send a MIDI message from the values given.
|
|
void | sendActiveSensing () |
|
void | sendAfterTouch (DataByte inNoteNumber, DataByte inPressure, Channel inChannel) |
| Send a Polyphonic AfterTouch message (applies to a specified note)
|
|
void | sendAfterTouch (DataByte inPressure, Channel inChannel) |
| Send a MonoPhonic AfterTouch message (applies to all notes)
|
|
void | sendClock () |
|
void | sendCommon (MidiType inType, unsigned=0) |
| Send a Common message. Common messages reset the running status.
|
|
void | sendContinue () |
|
void | sendControlChange (DataByte inControlNumber, DataByte inControlValue, Channel inChannel) |
| Send a Control Change message.
|
|
void | sendNoteOff (DataByte inNoteNumber, DataByte inVelocity, Channel inChannel) |
| Send a Note Off message.
|
|
void | sendNoteOn (DataByte inNoteNumber, DataByte inVelocity, Channel inChannel) |
| Send a Note On message.
|
|
void | sendNrpnDecrement (byte inAmount, Channel inChannel) |
|
void | sendNrpnIncrement (byte inAmount, Channel inChannel) |
|
void | sendNrpnValue (byte inMsb, byte inLsb, Channel inChannel) |
| Send separate MSB/LSB values for the currently selected NRPN number.
|
|
void | sendNrpnValue (unsigned inValue, Channel inChannel) |
| Send a 14-bit value for the currently selected NRPN number.
|
|
void | sendPitchBend (double inPitchValue, Channel inChannel) |
| Send a Pitch Bend message using a floating point value.
|
|
void | sendPitchBend (int inPitchValue, Channel inChannel) |
| Send a Pitch Bend message using a signed integer value.
|
|
void | sendPolyPressure (DataByte inNoteNumber, DataByte inPressure, Channel inChannel) |
| Send a Polyphonic AfterTouch message (applies to a specified note)
|
|
void | sendProgramChange (DataByte inProgramNumber, Channel inChannel) |
| Send a Program Change message.
|
|
void | sendRealTime (MidiType inType) |
| Send a Real Time (one byte) message.
|
|
void | sendRpnDecrement (byte inAmount, Channel inChannel) |
|
void | sendRpnIncrement (byte inAmount, Channel inChannel) |
|
void | sendRpnValue (byte inMsb, byte inLsb, Channel inChannel) |
| Send separate MSB/LSB values for the currently selected RPN number.
|
|
void | sendRpnValue (unsigned inValue, Channel inChannel) |
| Send a 14-bit value for the currently selected RPN number.
|
|
void | sendSongPosition (unsigned inBeats) |
| Send a Song Position Pointer message.
|
|
void | sendSongSelect (DataByte inSongNumber) |
| Send a Song Select message.
|
|
void | sendStart () |
|
void | sendStop () |
|
void | sendSysEx (unsigned inLength, const byte *inArray, bool inArrayContainsBoundaries=false) |
| Generate and send a System Exclusive frame.
|
|
void | sendSystemReset () |
|
void | sendTick () |
|
void | sendTimeCodeQuarterFrame (DataByte inData) |
| Send a MIDI Time Code Quarter Frame.
|
|
void | sendTimeCodeQuarterFrame (DataByte inTypeNibble, DataByte inValuesNibble) |
| Send a MIDI Time Code Quarter Frame.
|
|
void | sendTuneRequest () |
| Send a Tune Request message.
|
|
void | setHandleActiveSensing (ActiveSensingCallback fptr) |
|
void | setHandleAfterTouchChannel (AfterTouchChannelCallback fptr) |
|
void | setHandleAfterTouchPoly (AfterTouchPolyCallback fptr) |
|
void | setHandleClock (ClockCallback fptr) |
|
void | setHandleContinue (ContinueCallback fptr) |
|
void | setHandleControlChange (ControlChangeCallback fptr) |
|
void | setHandleError (ErrorCallback fptr) |
|
void | setHandleMessage (void(*fptr)(const MidiMessage &)) |
|
void | setHandleNoteOff (NoteOffCallback fptr) |
|
void | setHandleNoteOn (NoteOnCallback fptr) |
|
void | setHandlePitchBend (PitchBendCallback fptr) |
|
void | setHandleProgramChange (ProgramChangeCallback fptr) |
|
void | setHandleSongPosition (SongPositionCallback fptr) |
|
void | setHandleSongSelect (SongSelectCallback fptr) |
|
void | setHandleStart (StartCallback fptr) |
|
void | setHandleStop (StopCallback fptr) |
|
void | setHandleSystemExclusive (SystemExclusiveCallback fptr) |
|
void | setHandleSystemReset (SystemResetCallback fptr) |
|
void | setHandleTick (TickCallback fptr) |
|
void | setHandleTimeCodeQuarterFrame (TimeCodeQuarterFrameCallback fptr) |
|
void | setHandleTuneRequest (TuneRequestCallback fptr) |
|
void | setInputChannel (Channel inChannel) |
| Set the value for the input MIDI channel.
|
|
void | setThruFilterMode (Thru::Mode inThruFilterMode) |
| Set the filter for thru mirroring.
|
|
void | turnThruOff () |
|
void | turnThruOn (Thru::Mode inThruFilterMode=Thru::Full) |
|