Arduino MIDI Library  Version 4.3.1
Callbacks

Functions

void MidiInterface< SerialPort, _Settings >::setHandleNoteOff (void(*fptr)(byte channel, byte note, byte velocity))
 
void MidiInterface< SerialPort, _Settings >::setHandleNoteOn (void(*fptr)(byte channel, byte note, byte velocity))
 
void MidiInterface< SerialPort, _Settings >::setHandleAfterTouchPoly (void(*fptr)(byte channel, byte note, byte pressure))
 
void MidiInterface< SerialPort, _Settings >::setHandleControlChange (void(*fptr)(byte channel, byte number, byte value))
 
void MidiInterface< SerialPort, _Settings >::setHandleProgramChange (void(*fptr)(byte channel, byte number))
 
void MidiInterface< SerialPort, _Settings >::setHandleAfterTouchChannel (void(*fptr)(byte channel, byte pressure))
 
void MidiInterface< SerialPort, _Settings >::setHandlePitchBend (void(*fptr)(byte channel, int bend))
 
void MidiInterface< SerialPort, _Settings >::setHandleSystemExclusive (void(*fptr)(byte *array, unsigned size))
 
void MidiInterface< SerialPort, _Settings >::setHandleTimeCodeQuarterFrame (void(*fptr)(byte data))
 
void MidiInterface< SerialPort, _Settings >::setHandleSongPosition (void(*fptr)(unsigned beats))
 
void MidiInterface< SerialPort, _Settings >::setHandleSongSelect (void(*fptr)(byte songnumber))
 
void MidiInterface< SerialPort, _Settings >::setHandleTuneRequest (void(*fptr)(void))
 
void MidiInterface< SerialPort, _Settings >::setHandleClock (void(*fptr)(void))
 
void MidiInterface< SerialPort, _Settings >::setHandleStart (void(*fptr)(void))
 
void MidiInterface< SerialPort, _Settings >::setHandleContinue (void(*fptr)(void))
 
void MidiInterface< SerialPort, _Settings >::setHandleStop (void(*fptr)(void))
 
void MidiInterface< SerialPort, _Settings >::setHandleActiveSensing (void(*fptr)(void))
 
void MidiInterface< SerialPort, _Settings >::setHandleSystemReset (void(*fptr)(void))
 
void MidiInterface< SerialPort, _Settings >::disconnectCallbackFromType (MidiType inType)
 Detach an external function from the given type. More...
 

Detailed Description

Function Documentation

§ disconnectCallbackFromType()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::disconnectCallbackFromType ( MidiType  inType)
inline

Detach an external function from the given type.

Use this method to cancel the effects of setHandle********.

Parameters
inTypeThe type of message to unbind. When a message of this type is received, no function will be called.

Definition at line 1166 of file MIDI.hpp.

1167 {
1168  switch (inType)
1169  {
1170  case NoteOff: mNoteOffCallback = 0; break;
1171  case NoteOn: mNoteOnCallback = 0; break;
1172  case AfterTouchPoly: mAfterTouchPolyCallback = 0; break;
1173  case ControlChange: mControlChangeCallback = 0; break;
1174  case ProgramChange: mProgramChangeCallback = 0; break;
1175  case AfterTouchChannel: mAfterTouchChannelCallback = 0; break;
1176  case PitchBend: mPitchBendCallback = 0; break;
1177  case SystemExclusive: mSystemExclusiveCallback = 0; break;
1178  case TimeCodeQuarterFrame: mTimeCodeQuarterFrameCallback = 0; break;
1179  case SongPosition: mSongPositionCallback = 0; break;
1180  case SongSelect: mSongSelectCallback = 0; break;
1181  case TuneRequest: mTuneRequestCallback = 0; break;
1182  case Clock: mClockCallback = 0; break;
1183  case Start: mStartCallback = 0; break;
1184  case Continue: mContinueCallback = 0; break;
1185  case Stop: mStopCallback = 0; break;
1186  case ActiveSensing: mActiveSensingCallback = 0; break;
1187  case SystemReset: mSystemResetCallback = 0; break;
1188  default:
1189  break;
1190  }
1191 }
System Common - Song Position Pointer.
Definition: midi_Defs.h:77
Polyphonic AfterTouch.
Definition: midi_Defs.h:70
System Common - Song Select.
Definition: midi_Defs.h:78
System Exclusive.
Definition: midi_Defs.h:75
System Real Time - Stop.
Definition: midi_Defs.h:83
System Real Time - Timing Clock.
Definition: midi_Defs.h:80
System Common - MIDI Time Code Quarter Frame.
Definition: midi_Defs.h:76
Channel (monophonic) AfterTouch.
Definition: midi_Defs.h:73
Program Change.
Definition: midi_Defs.h:72
System Real Time - Continue.
Definition: midi_Defs.h:82
System Real Time - Start.
Definition: midi_Defs.h:81
Note On.
Definition: midi_Defs.h:69
Control Change / Channel Mode.
Definition: midi_Defs.h:71
System Common - Tune Request.
Definition: midi_Defs.h:79
Pitch Bend.
Definition: midi_Defs.h:74
System Real Time - Active Sensing.
Definition: midi_Defs.h:84
Note Off.
Definition: midi_Defs.h:68
System Real Time - System Reset.
Definition: midi_Defs.h:85

§ setHandleActiveSensing()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleActiveSensing ( void(*)(void)  fptr)
inline

Definition at line 1156 of file MIDI.hpp.

1156 { mActiveSensingCallback = fptr; }

§ setHandleAfterTouchChannel()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleAfterTouchChannel ( void(*)(byte channel, byte pressure)  fptr)
inline

Definition at line 1145 of file MIDI.hpp.

1145 { mAfterTouchChannelCallback = fptr; }

§ setHandleAfterTouchPoly()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleAfterTouchPoly ( void(*)(byte channel, byte note, byte pressure)  fptr)
inline

Definition at line 1142 of file MIDI.hpp.

1142 { mAfterTouchPolyCallback = fptr; }

§ setHandleClock()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleClock ( void(*)(void)  fptr)
inline

Definition at line 1152 of file MIDI.hpp.

1152 { mClockCallback = fptr; }

§ setHandleContinue()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleContinue ( void(*)(void)  fptr)
inline

Definition at line 1154 of file MIDI.hpp.

1154 { mContinueCallback = fptr; }

§ setHandleControlChange()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleControlChange ( void(*)(byte channel, byte number, byte value)  fptr)
inline

Definition at line 1143 of file MIDI.hpp.

1143 { mControlChangeCallback = fptr; }

§ setHandleNoteOff()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleNoteOff ( void(*)(byte channel, byte note, byte velocity)  fptr)
inline

Definition at line 1140 of file MIDI.hpp.

1140 { mNoteOffCallback = fptr; }

§ setHandleNoteOn()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleNoteOn ( void(*)(byte channel, byte note, byte velocity)  fptr)
inline

Definition at line 1141 of file MIDI.hpp.

1141 { mNoteOnCallback = fptr; }

§ setHandlePitchBend()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandlePitchBend ( void(*)(byte channel, int bend)  fptr)
inline

Definition at line 1146 of file MIDI.hpp.

1146 { mPitchBendCallback = fptr; }

§ setHandleProgramChange()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleProgramChange ( void(*)(byte channel, byte number)  fptr)
inline

Definition at line 1144 of file MIDI.hpp.

1144 { mProgramChangeCallback = fptr; }

§ setHandleSongPosition()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleSongPosition ( void(*)(unsigned beats)  fptr)
inline

Definition at line 1149 of file MIDI.hpp.

1149 { mSongPositionCallback = fptr; }

§ setHandleSongSelect()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleSongSelect ( void(*)(byte songnumber)  fptr)
inline

Definition at line 1150 of file MIDI.hpp.

1150 { mSongSelectCallback = fptr; }

§ setHandleStart()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleStart ( void(*)(void)  fptr)
inline

Definition at line 1153 of file MIDI.hpp.

1153 { mStartCallback = fptr; }

§ setHandleStop()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleStop ( void(*)(void)  fptr)
inline

Definition at line 1155 of file MIDI.hpp.

1155 { mStopCallback = fptr; }

§ setHandleSystemExclusive()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleSystemExclusive ( void(*)(byte *array, unsigned size)  fptr)
inline

Definition at line 1147 of file MIDI.hpp.

1147 { mSystemExclusiveCallback = fptr; }

§ setHandleSystemReset()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleSystemReset ( void(*)(void)  fptr)
inline

Definition at line 1157 of file MIDI.hpp.

1157 { mSystemResetCallback = fptr; }

§ setHandleTimeCodeQuarterFrame()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleTimeCodeQuarterFrame ( void(*)(byte data)  fptr)
inline

Definition at line 1148 of file MIDI.hpp.

1148 { mTimeCodeQuarterFrameCallback = fptr; }

§ setHandleTuneRequest()

template<class SerialPort , class Settings >
void MidiInterface< SerialPort, Settings >::setHandleTuneRequest ( void(*)(void)  fptr)
inline

Definition at line 1151 of file MIDI.hpp.

1151 { mTuneRequestCallback = fptr; }