Arduino MIDI Library  Version 4.3
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 1167 of file MIDI.hpp.

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

§ setHandleActiveSensing()

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

Definition at line 1157 of file MIDI.hpp.

1157 { mActiveSensingCallback = fptr; }

§ setHandleAfterTouchChannel()

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

Definition at line 1146 of file MIDI.hpp.

1146 { 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 1143 of file MIDI.hpp.

1143 { mAfterTouchPolyCallback = fptr; }

§ setHandleClock()

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

Definition at line 1153 of file MIDI.hpp.

1153 { mClockCallback = fptr; }

§ setHandleContinue()

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

Definition at line 1155 of file MIDI.hpp.

1155 { 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 1144 of file MIDI.hpp.

1144 { 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 1141 of file MIDI.hpp.

1141 { 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 1142 of file MIDI.hpp.

1142 { mNoteOnCallback = fptr; }

§ setHandlePitchBend()

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

Definition at line 1147 of file MIDI.hpp.

1147 { mPitchBendCallback = fptr; }

§ setHandleProgramChange()

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

Definition at line 1145 of file MIDI.hpp.

1145 { mProgramChangeCallback = fptr; }

§ setHandleSongPosition()

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

Definition at line 1150 of file MIDI.hpp.

1150 { mSongPositionCallback = fptr; }

§ setHandleSongSelect()

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

Definition at line 1151 of file MIDI.hpp.

1151 { mSongSelectCallback = fptr; }

§ setHandleStart()

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

Definition at line 1154 of file MIDI.hpp.

1154 { mStartCallback = fptr; }

§ setHandleStop()

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

Definition at line 1156 of file MIDI.hpp.

1156 { mStopCallback = fptr; }

§ setHandleSystemExclusive()

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

Definition at line 1148 of file MIDI.hpp.

1148 { mSystemExclusiveCallback = fptr; }

§ setHandleSystemReset()

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

Definition at line 1158 of file MIDI.hpp.

1158 { mSystemResetCallback = fptr; }

§ setHandleTimeCodeQuarterFrame()

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

Definition at line 1149 of file MIDI.hpp.

1149 { mTimeCodeQuarterFrameCallback = fptr; }

§ setHandleTuneRequest()

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

Definition at line 1152 of file MIDI.hpp.

1152 { mTuneRequestCallback = fptr; }