A library to send and receive MIDI messages over USB using the default USB-MIDI drivers on Win/Mac

Dependents:   USBMIDI_HelloWorld USBMIDI_DrumExample USBMIDI_MonoSynth MIDI_Interface_ver_1 ... more

Embed: (wiki syntax)

« Back to documentation index

USBMIDI Class Reference

USBMIDI Class Reference

USBMIDI interface class for sending and receiving MIDI messages over USB. More...

#include <USBMIDI.h>

Public Member Functions

 USBMIDI ()
 Create the USBMIDI interface.
void write (MIDIMessage m)
 Send a MIDIMessage.
bool writeable ()
 Check if it possible to send a MIDIMessage.
void attach (void(*fptr)(MIDIMessage))
 Attach a callback for when a MIDIEvent is received.

Detailed Description

USBMIDI interface class for sending and receiving MIDI messages over USB.

Definition at line 29 of file USBMIDI.h.


Constructor & Destructor Documentation

USBMIDI (  )

Create the USBMIDI interface.

Definition at line 30 of file USBMIDI.cpp.


Member Function Documentation

void attach ( void(*)(MIDIMessage fptr )

Attach a callback for when a MIDIEvent is received.

Definition at line 45 of file USBMIDI.cpp.

void write ( MIDIMessage  m )

Send a MIDIMessage.

Parameters:
mThe MIDIMessage to send

Definition at line 36 of file USBMIDI.cpp.

bool writeable (  )

Check if it possible to send a MIDIMessage.

Returns:
True if there's an empty buffer for sending a MIDIMessage, otherwise False

Definition at line 41 of file USBMIDI.cpp.