VuoMidi interface.
Definition in file VuoMidi.h.
Go to the source code of this file.
Typedefs | |
typedef void * | VuoMidiOut |
Manages sending messages to a MIDI device. More... | |
typedef void * | VuoMidiIn |
Manages receiving messages from a MIDI device. More... | |
Functions | |
void | VuoMidi_use (void) |
Indicates that the caller needs to get notifications about MIDI devices. More... | |
void | VuoMidi_disuse (void) |
Indicates that the caller no longer needs notifications about MIDI devices. More... | |
void | VuoMidi_addDevicesChangedTriggers (VuoOutputTrigger(inputDevices, VuoList_VuoMidiInputDevice), VuoOutputTrigger(outputDevices, VuoList_VuoMidiOutputDevice)) |
Adds a trigger callback, to be invoked whenever the list of known MIDI devices changes. More... | |
void | VuoMidi_removeDevicesChangedTriggers (VuoOutputTrigger(inputDevices, VuoList_VuoMidiInputDevice), VuoOutputTrigger(outputDevices, VuoList_VuoMidiOutputDevice)) |
Removes a trigger callback previously added by VuoMidi_addDevicesChangedTriggers. More... | |
VuoList_VuoMidiInputDevice | VuoMidi_getInputDevices (void) |
Returns a list of the available MIDI input devices. More... | |
VuoList_VuoMidiOutputDevice | VuoMidi_getOutputDevices (void) |
Returns a list of the available MIDI output devices. More... | |
bool | VuoMidiInputDevice_realize (VuoMidiInputDevice device, VuoMidiInputDevice *realizedDevice) |
If device 's ID or name is unknown: More... | |
bool | VuoMidiOutputDevice_realize (VuoMidiOutputDevice device, VuoMidiOutputDevice *realizedDevice) |
If device 's ID or name unknown: More... | |
VuoMidiOut | VuoMidiOut_make (VuoMidiOutputDevice md) |
Creates a reference-counted object to manage sending messages to a MIDI device. More... | |
void | VuoMidiOut_sendNote (VuoMidiOut mo, VuoMidiNote note) |
Outputs the specified note event through the specified MIDI output device mo . More... | |
void | VuoMidiOut_sendController (VuoMidiOut mo, VuoMidiController controller) |
Outputs the specified controller event through the specified MIDI output device mo . More... | |
void | VuoMidiOut_sendPitchBend (VuoMidiOut mo, VuoMidiPitchBend pitchBend) |
Outputs the specified pitchBend event through the specified MIDI output device mo . More... | |
VuoMidiIn | VuoMidiIn_make (VuoMidiInputDevice md) |
Creates a reference-counted object to manage receiving messages from a MIDI device. More... | |
void | VuoMidiIn_enableTriggers (VuoMidiIn mi, void(*receivedNote)(void *context, VuoMidiNote note), void(*receivedController)(void *context, VuoMidiController controller), void(*receivedPitchBend)(void *context, VuoMidiPitchBend pitchBend), void *context) |
Sets up the MIDI input device to call the trigger functions when it receives an event. More... | |
void | VuoMidiIn_disableTriggers (VuoMidiIn mi) |
Stops the MIDI input device from calling trigger functions when it receives an event. More... | |
typedef void* VuoMidiIn |
typedef void* VuoMidiOut |
void VuoMidi_addDevicesChangedTriggers | ( | VuoOutputTrigger(inputDevices, VuoList_VuoMidiInputDevice) | , |
VuoOutputTrigger(outputDevices, VuoList_VuoMidiOutputDevice) | |||
) |
Adds a trigger callback, to be invoked whenever the list of known MIDI devices changes.
Call VuoMidi_use()
before calling this.
This function may be called from any thread.
Definition at line 151 of file VuoMidi.cc.
void VuoMidi_disuse | ( | void | ) |
Indicates that the caller no longer needs notifications about MIDI devices.
This function may be called from any thread.
Definition at line 123 of file VuoMidi.cc.
VuoList_VuoMidiInputDevice VuoMidi_getInputDevices | ( | void | ) |
Returns a list of the available MIDI input devices.
Definition at line 52 of file VuoMidi.cc.
VuoList_VuoMidiOutputDevice VuoMidi_getOutputDevices | ( | void | ) |
Returns a list of the available MIDI output devices.
Definition at line 70 of file VuoMidi.cc.
void VuoMidi_removeDevicesChangedTriggers | ( | VuoOutputTrigger(inputDevices, VuoList_VuoMidiInputDevice) | , |
VuoOutputTrigger(outputDevices, VuoList_VuoMidiOutputDevice) | |||
) |
Removes a trigger callback previously added by VuoMidi_addDevicesChangedTriggers.
This function may be called from any thread.
Definition at line 165 of file VuoMidi.cc.
void VuoMidi_use | ( | void | ) |
Indicates that the caller needs to get notifications about MIDI devices.
This function may be called from any thread.
Definition at line 103 of file VuoMidi.cc.
void VuoMidiIn_disableTriggers | ( | VuoMidiIn | mi | ) |
Stops the MIDI input device from calling trigger functions when it receives an event.
This function may be called from any thread.
Definition at line 407 of file VuoMidi.cc.
void VuoMidiIn_enableTriggers | ( | VuoMidiIn | mi, |
void(*)(void *context, VuoMidiNote note) | receivedNote, | ||
void(*)(void *context, VuoMidiController controller) | receivedController, | ||
void(*)(void *context, VuoMidiPitchBend pitchBend) | receivedPitchBend, | ||
void * | context | ||
) |
Sets up the MIDI input device to call the trigger functions when it receives an event.
This function may be called from any thread.
Definition at line 383 of file VuoMidi.cc.
VuoMidiIn VuoMidiIn_make | ( | VuoMidiInputDevice | md | ) |
Creates a reference-counted object to manage receiving messages from a MIDI device.
Definition at line 339 of file VuoMidi.cc.
bool VuoMidiInputDevice_realize | ( | VuoMidiInputDevice | device, |
VuoMidiInputDevice * | realizedDevice | ||
) |
If device
's ID or name is unknown:
realizedDevice
to that device, and returns true.realizedDevice
unset.If device
's ID and name are already known (presumably from the List MIDI Devices
node), sets realizedDevice
to a copy of device
, and returns true. (Doesn't bother checking whether the device is currently present.)
This function may be called from any thread.
Definition at line 449 of file VuoMidi.cc.
VuoMidiOut VuoMidiOut_make | ( | VuoMidiOutputDevice | md | ) |
Creates a reference-counted object to manage sending messages to a MIDI device.
Definition at line 176 of file VuoMidi.cc.
void VuoMidiOut_sendController | ( | VuoMidiOut | mo, |
VuoMidiController | controller | ||
) |
Outputs the specified controller
event through the specified MIDI output device mo
.
Definition at line 222 of file VuoMidi.cc.
void VuoMidiOut_sendNote | ( | VuoMidiOut | mo, |
VuoMidiNote | note | ||
) |
Outputs the specified note
event through the specified MIDI output device mo
.
Definition at line 206 of file VuoMidi.cc.
void VuoMidiOut_sendPitchBend | ( | VuoMidiOut | mo, |
VuoMidiPitchBend | pitchBend | ||
) |
Outputs the specified pitchBend
event through the specified MIDI output device mo
.
Definition at line 238 of file VuoMidi.cc.
bool VuoMidiOutputDevice_realize | ( | VuoMidiOutputDevice | device, |
VuoMidiOutputDevice * | realizedDevice | ||
) |
If device
's ID or name unknown:
realizedDevice
to that device, and returns true.realizedDevice
unset.If device
's ID and name are already known (presumably from the List MIDI Devices
node), sets realizedDevice
to a copy of device
, and returns true. (Doesn't bother checking whether the device is currently present.)
This function may be called from any thread.
Definition at line 520 of file VuoMidi.cc.