Functions

Input callback registration functions

These are the functions you use to register your input callbacks. More...

Functions

void midi_register_cc_callback (MidiDevice *device, midi_three_byte_func_t func)
 Register a control change message (cc) callback.
void midi_register_noteon_callback (MidiDevice *device, midi_three_byte_func_t func)
 Register a note on callback.
void midi_register_noteoff_callback (MidiDevice *device, midi_three_byte_func_t func)
 Register a note off callback.
void midi_register_aftertouch_callback (MidiDevice *device, midi_three_byte_func_t func)
 Register an after touch callback.
void midi_register_pitchbend_callback (MidiDevice *device, midi_three_byte_func_t func)
 Register a pitch bend callback.
void midi_register_songposition_callback (MidiDevice *device, midi_three_byte_func_t func)
 Register a song position callback.
void midi_register_progchange_callback (MidiDevice *device, midi_two_byte_func_t func)
 Register a program change callback.
void midi_register_chanpressure_callback (MidiDevice *device, midi_two_byte_func_t func)
 Register a channel pressure callback.
void midi_register_songselect_callback (MidiDevice *device, midi_two_byte_func_t func)
 Register a song select callback.
void midi_register_tc_quarterframe_callback (MidiDevice *device, midi_two_byte_func_t func)
 Register a tc quarter frame callback.
void midi_register_realtime_callback (MidiDevice *device, midi_one_byte_func_t func)
 Register a realtime callback.
void midi_register_tunerequest_callback (MidiDevice *device, midi_one_byte_func_t func)
 Register a tune request callback.
void midi_register_sysex_callback (MidiDevice *device, midi_var_byte_func_t func)
 Register a sysex callback.
void midi_register_fallthrough_callback (MidiDevice *device, midi_var_byte_func_t func)
 Register fall through callback.
void midi_register_catchall_callback (MidiDevice *device, midi_var_byte_func_t func)
 Register a catch all callback.

Detailed Description

These are the functions you use to register your input callbacks.

The functions are called when the appropriate midi message is matched on the associated device's input.


Function Documentation

void midi_register_aftertouch_callback ( MidiDevice device,
midi_three_byte_func_t  func 
)

Register an after touch callback.

Parameters:
device the device associate with
func the callback function to register
void midi_register_catchall_callback ( MidiDevice device,
midi_var_byte_func_t  func 
)

Register a catch all callback.

If registered, the catch all callback is called for every message that is matched, even if a more specific or the fallthrough callback is registered.

Parameters:
device the device associate with
func the callback function to register
void midi_register_cc_callback ( MidiDevice device,
midi_three_byte_func_t  func 
)

Register a control change message (cc) callback.

Parameters:
device the device associate with
func the callback function to register
void midi_register_chanpressure_callback ( MidiDevice device,
midi_two_byte_func_t  func 
)

Register a channel pressure callback.

Parameters:
device the device associate with
func the callback function to register
void midi_register_fallthrough_callback ( MidiDevice device,
midi_var_byte_func_t  func 
)

Register fall through callback.

This is only called if a more specific callback is not matched and called. For instance, if you don't register a note on callback but you get a note on message the fall through callback will be called, if it is registered.

Parameters:
device the device associate with
func the callback function to register
void midi_register_noteoff_callback ( MidiDevice device,
midi_three_byte_func_t  func 
)

Register a note off callback.

Parameters:
device the device associate with
func the callback function to register
void midi_register_noteon_callback ( MidiDevice device,
midi_three_byte_func_t  func 
)

Register a note on callback.

Parameters:
device the device associate with
func the callback function to register
void midi_register_pitchbend_callback ( MidiDevice device,
midi_three_byte_func_t  func 
)

Register a pitch bend callback.

Parameters:
device the device associate with
func the callback function to register
void midi_register_progchange_callback ( MidiDevice device,
midi_two_byte_func_t  func 
)

Register a program change callback.

Parameters:
device the device associate with
func the callback function to register
void midi_register_realtime_callback ( MidiDevice device,
midi_one_byte_func_t  func 
)

Register a realtime callback.

The callback will be called for all of the real time message types.

Parameters:
device the device associate with
func the callback function to register
void midi_register_songposition_callback ( MidiDevice device,
midi_three_byte_func_t  func 
)

Register a song position callback.

Parameters:
device the device associate with
func the callback function to register
void midi_register_songselect_callback ( MidiDevice device,
midi_two_byte_func_t  func 
)

Register a song select callback.

Parameters:
device the device associate with
func the callback function to register
void midi_register_sysex_callback ( MidiDevice device,
midi_var_byte_func_t  func 
)

Register a sysex callback.

This callback works differently than the others because we don't know how long the sysex messages are going to be. The count given to the associated callback function is the running count of the bytes associated with this sysex message. The callback is called in increments of 3 or less.

As an example, if you had the sysex message 0xF0 0x00 0x01 0x02 0xF7 the callback would be called twice: func(device, 3, 0xF0, 0x00, 0x01) func(device, 5, 0x02, 0xF7, 0x00)

Parameters:
device the device associate with
func the callback function to register
void midi_register_tc_quarterframe_callback ( MidiDevice device,
midi_two_byte_func_t  func 
)

Register a tc quarter frame callback.

Parameters:
device the device associate with
func the callback function to register
void midi_register_tunerequest_callback ( MidiDevice device,
midi_one_byte_func_t  func 
)

Register a tune request callback.

Parameters:
device the device associate with
func the callback function to register