You are viewing an older revision! See the latest version
USBMIDI
The USBMIDI interface can be used to send and receive MIDI messages over USB using the standard USB-MIDI protocol.
Using this library, you can do things like send MIDI messages to a computer (such as to record in a sequencer, or trigger a software synthesiser) and receive messages from a computer (such as actuate things based on MIDI events)
The USB connector should be attached to p31 (D+), p32 (D-) and GND. You can also connect the USB power to VIN to power the mbed when connected.
Hello World¶
Repository: USBMIDI_HelloWorld
API¶
Import library
Public Member Functions |
|
USBMIDI (uint16_t vendor_id=0x0700, uint16_t product_id=0x0101, uint16_t product_release=0x0001) | |
Constructor.
|
|
void | write ( MIDIMessage m) |
Send a
MIDIMessage
.
|
|
void | attach (void(*fptr)( MIDIMessage )) |
Attach a callback for when a MIDIEvent is received.
|
More example¶
In this example, you can control the MIDI message sent with buttons