File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
examples/NoteOnOffEverySec Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ void setup()
2222{
2323 Serial.begin (115200 );
2424 while (!Serial);
25+
2526 MIDI.begin ();
2627 MIDI.setHandleNoteOn (handleNoteOn);
2728 MIDI.setHandleNoteOff (handleNoteOff);
@@ -34,4 +35,4 @@ void setup()
3435void loop ()
3536{
3637 MIDI.read ();
37- }
38+ }
Original file line number Diff line number Diff line change @@ -170,12 +170,11 @@ class usbMidiTransport
170170
171171/* ! \brief
172172 */
173- #define USBMIDI_CREATE_INSTANCE (CABLENR ) \
174- typedef USBMIDI_NAMESPACE::usbMidiTransport __umt;\
175- __umt usbMIDI (CABLENR);\
176- MIDI_NAMESPACE::MidiInterface<__umt> MIDI ((__umt&)usbMIDI);
173+ #define USBMIDI_CREATE_INSTANCE (CableNr, Name ) \
174+ USBMIDI_NAMESPACE::usbMidiTransport usb##Name(CableNr);\
175+ MIDI_NAMESPACE::MidiInterface<USBMIDI_NAMESPACE::usbMidiTransport> Name ((USBMIDI_NAMESPACE::usbMidiTransport&)usb##Name);
177176
178177#define USBMIDI_CREATE_DEFAULT_INSTANCE () \
179- USBMIDI_CREATE_INSTANCE (0 )
178+ USBMIDI_CREATE_INSTANCE (0 , MIDI )
180179
181180END_USBMIDI_NAMESPACE
You can’t perform that action at this time.
0 commit comments