The RtMidi Tutorial

Tutorial Class/Enum List File List Compound Members C interface

Classes | Typedefs | Enumerations | Functions
rtmidi_c.h File Reference
C-interface
`#include <stdbool.h>`
`#include <stddef.h>`

Go to the source code of this file.

## Classes
struct | RtMidiOutPtr
| Wraps an RtMidi object for C function return statuses. More...

## Typedefs
typedef void(* | RtMidiCCallback) (double timeStamp, const unsigned char *message, size_t messageSize, void *userData)
| The type of a RtMidi callback function.

## Enumerations
enum | RtMidiApi { RTMIDI_API_UNSPECIFIED , RTMIDI_API_MACOSX_CORE , RTMIDI_API_LINUX_ALSA , RTMIDI_API_UNIX_JACK , RTMIDI_API_WINDOWS_MM , RTMIDI_API_RTMIDI_DUMMY , RTMIDI_API_NUM }
| MIDI API specifier arguments. See RtMidi::Api. More...
enum | RtMidiErrorType { RTMIDI_ERROR_WARNING , RTMIDI_ERROR_DEBUG_WARNING , RTMIDI_ERROR_UNSPECIFIED , RTMIDI_ERROR_NO_DEVICES_FOUND , RTMIDI_ERROR_INVALID_DEVICE , RTMIDI_ERROR_MEMORY_ERROR , RTMIDI_ERROR_INVALID_PARAMETER , RTMIDI_ERROR_INVALID_USE , RTMIDI_ERROR_DRIVER_ERROR , RTMIDI_ERROR_SYSTEM_ERROR , RTMIDI_ERROR_THREAD_ERROR }
| Defined RtMidiError types. See RtMidiError::Type. More...

## Functions
RTMIDIAPI int | rtmidi_get_compiled_api (enum RtMidiApi *apis, unsigned int apis_size)
| Determine the available compiled MIDI APIs.
RTMIDIAPI const char * | rtmidi_api_name (enum RtMidiApi api)
| Return the name of a specified compiled MIDI API. See RtMidi::getApiName().
RTMIDIAPI const char * | rtmidi_api_display_name (enum RtMidiApi api)
| Return the display name of a specified compiled MIDI API. See RtMidi::getApiDisplayName().
RTMIDIAPI enum RtMidiApi | rtmidi_compiled_api_by_name (const char *name)
| Return the compiled MIDI API having the given name. See RtMidi::getCompiledApiByName().
RTMIDIAPI void | rtmidi_open_port (RtMidiPtr device, unsigned int portNumber, const char *portName)
| Open a MIDI port.
RTMIDIAPI void | rtmidi_open_virtual_port (RtMidiPtr device, const char *portName)
| Creates a virtual MIDI port to which other software applications can connect.
RTMIDIAPI void | rtmidi_close_port (RtMidiPtr device)
| Close a MIDI connection. See RtMidi::closePort().
RTMIDIAPI unsigned int | rtmidi_get_port_count (RtMidiPtr device)
| Return the number of available MIDI ports. See RtMidi::getPortCount().
RTMIDIAPI int | rtmidi_get_port_name (RtMidiPtr device, unsigned int portNumber, char *bufOut, int *bufLen)
| Access a string identifier for the specified MIDI input port number.
RTMIDIAPI RtMidiInPtr | rtmidi_in_create_default (void)
| Create a default RtMidiInPtr value, with no initialization.
RTMIDIAPI RtMidiInPtr | rtmidi_in_create (enum RtMidiApi api, const char *clientName, unsigned int queueSizeLimit)
| Create a RtMidiInPtr value, with given api, clientName and queueSizeLimit.
RTMIDIAPI void | rtmidi_in_free (RtMidiInPtr device)
| Free the given RtMidiInPtr.
RTMIDIAPI enum RtMidiApi | rtmidi_in_get_current_api (RtMidiPtr device)
| Returns the MIDI API specifier for the given instance of RtMidiIn. See RtMidiIn::getCurrentApi().
RTMIDIAPI void | rtmidi_in_set_callback (RtMidiInPtr device, RtMidiCCallback callback, void *userData)
| Set a callback function to be invoked for incoming MIDI messages. See RtMidiIn::setCallback().
RTMIDIAPI void | rtmidi_in_cancel_callback (RtMidiInPtr device)
| Cancel use of the current callback function (if one exists). See RtMidiIn::cancelCallback().
RTMIDIAPI void | rtmidi_in_ignore_types (RtMidiInPtr device, bool midiSysex, bool midiTime, bool midiSense)
| Specify whether certain MIDI message types should be queued or ignored during input. See RtMidiIn::ignoreTypes().
RTMIDIAPI double | rtmidi_in_get_message (RtMidiInPtr device, unsigned char *message, size_t *size)
RTMIDIAPI RtMidiOutPtr | rtmidi_out_create_default (void)
| Create a default RtMidiInPtr value, with no initialization.
RTMIDIAPI RtMidiOutPtr | rtmidi_out_create (enum RtMidiApi api, const char *clientName)
| Create a RtMidiOutPtr value, with given and clientName.
RTMIDIAPI void | rtmidi_out_free (RtMidiOutPtr device)
| Free the given RtMidiOutPtr.
RTMIDIAPI enum RtMidiApi | rtmidi_out_get_current_api (RtMidiPtr device)
| Returns the MIDI API specifier for the given instance of RtMidiOut. See RtMidiOut::getCurrentApi().
RTMIDIAPI int | rtmidi_out_send_message (RtMidiOutPtr device, const unsigned char *message, int length)
| Immediately send a single message out an open MIDI output port. See RtMidiOut::sendMessage().

| ©2003-2021 Gary P. Scavone, McGill University. All Rights Reserved. Maintained by Gary P. Scavone, gary at music.mcgill.ca