Vuo  2.3.2
Typedefs | Functions
VuoMidi.h File Reference

Description

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 Documentation

◆ VuoMidiIn

typedef void* VuoMidiIn

Manages receiving messages from a MIDI device.

Definition at line 49 of file VuoMidi.h.

◆ VuoMidiOut

typedef void* VuoMidiOut

Manages sending messages to a MIDI device.

Definition at line 38 of file VuoMidi.h.

Function Documentation

◆ VuoMidi_addDevicesChangedTriggers()

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.

Changed in Vuo 2.0.0:
New.

Definition at line 151 of file VuoMidi.cc.

◆ VuoMidi_disuse()

void VuoMidi_disuse ( void  )

Indicates that the caller no longer needs notifications about MIDI devices.

This function may be called from any thread.

Changed in Vuo 2.0.0:
New.

Definition at line 123 of file VuoMidi.cc.

◆ VuoMidi_getInputDevices()

VuoList_VuoMidiInputDevice VuoMidi_getInputDevices ( void  )

Returns a list of the available MIDI input devices.

Definition at line 52 of file VuoMidi.cc.

◆ VuoMidi_getOutputDevices()

VuoList_VuoMidiOutputDevice VuoMidi_getOutputDevices ( void  )

Returns a list of the available MIDI output devices.

Definition at line 70 of file VuoMidi.cc.

◆ VuoMidi_removeDevicesChangedTriggers()

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.

Changed in Vuo 2.0.0:
New.

Definition at line 165 of file VuoMidi.cc.

◆ VuoMidi_use()

void VuoMidi_use ( void  )

Indicates that the caller needs to get notifications about MIDI devices.

This function may be called from any thread.

Changed in Vuo 2.0.0:
New.

Definition at line 103 of file VuoMidi.cc.

◆ VuoMidiIn_disableTriggers()

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 410 of file VuoMidi.cc.

◆ VuoMidiIn_enableTriggers()

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 385 of file VuoMidi.cc.

◆ VuoMidiIn_make()

VuoMidiIn VuoMidiIn_make ( VuoMidiInputDevice  md)

Creates a reference-counted object to manage receiving messages from a MIDI device.

Definition at line 342 of file VuoMidi.cc.

◆ VuoMidiInputDevice_realize()

bool VuoMidiInputDevice_realize ( VuoMidiInputDevice  device,
VuoMidiInputDevice realizedDevice 
)

If device's ID or name is unknown:

  • If a matching device is present, sets realizedDevice to that device, and returns true.
  • If no matching device is present, returns false, leaving 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 452 of file VuoMidi.cc.

◆ VuoMidiOut_make()

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.

◆ VuoMidiOut_sendController()

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.

◆ VuoMidiOut_sendNote()

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.

◆ VuoMidiOut_sendPitchBend()

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.

◆ VuoMidiOutputDevice_realize()

bool VuoMidiOutputDevice_realize ( VuoMidiOutputDevice  device,
VuoMidiOutputDevice realizedDevice 
)

If device's ID or name unknown:

  • If a matching device is present, sets realizedDevice to that device, and returns true.
  • If no matching device is present, returns false, leaving 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 523 of file VuoMidi.cc.