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

Committer:
simon
Date:
Sun Feb 06 17:26:29 2011 +0000
Revision:
0:56b095524cf2
Child:
1:ff74eabe02cd

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
simon 0:56b095524cf2 1 #ifndef MBED_USBMIDI_H
simon 0:56b095524cf2 2 #define MBED_USBMIDI_H
simon 0:56b095524cf2 3
simon 0:56b095524cf2 4 #include "MIDIMessage.h"
simon 0:56b095524cf2 5
simon 0:56b095524cf2 6 class USBMIDI {
simon 0:56b095524cf2 7 public:
simon 0:56b095524cf2 8 USBMIDI() {}
simon 0:56b095524cf2 9 ~USBMIDI() {}
simon 0:56b095524cf2 10
simon 0:56b095524cf2 11 // write messages
simon 0:56b095524cf2 12 void write(MIDIMessage m) {}
simon 0:56b095524cf2 13 int writeable() { return 0; }
simon 0:56b095524cf2 14
simon 0:56b095524cf2 15 // read messages
simon 0:56b095524cf2 16 MIDIMessage read() { return MIDIMessage::NoteOn(0); }
simon 0:56b095524cf2 17 int readable() { return 0; }
simon 0:56b095524cf2 18
simon 0:56b095524cf2 19 // notification of incoming message
simon 0:56b095524cf2 20 void attach(void (*fptr)(void)) {}
simon 0:56b095524cf2 21
simon 0:56b095524cf2 22 template <class T>
simon 0:56b095524cf2 23 void attach(T *tptr, void (T::*mptr)(void)) {}
simon 0:56b095524cf2 24 };
simon 0:56b095524cf2 25
simon 0:56b095524cf2 26 #endif