Skip to content

Commit b457f6d

Browse files
committed
added USB Migration and other Transport mechanisms
1 parent be85c7b commit b457f6d

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,52 @@ void loop()
5050

5151
3. Read the [documentation](#documentation) or watch the awesome video tutorials from [Notes & Volts](https://www.youtube.com/playlist?list=PL4_gPbvyebyH2xfPXePHtx8gK5zPBrVkg).
5252

53+
## USB Migration
54+
55+
All USB related code has been moved into a separate repository [Arduino-USB-MIDI](https://github.com/lathoub/Arduino-USBMIDI), USB MIDI Device support with [`MIDIUSB`](https://github.com/arduino-libraries/MIDIUSB), still using this library to do all the MIDI heavy-lifting.
56+
57+
Migration has been made as easy as possible: only the declaration of the MIDI object has been modified, the code remains identical.
58+
59+
`4.3.1` code:
60+
61+
```c++
62+
#include <MIDI.h>
63+
#include <midi_UsbTransport.h>
64+
65+
static const unsigned sUsbTransportBufferSize = 16;
66+
typedef midi::UsbTransport<sUsbTransportBufferSize> UsbTransport;
67+
68+
UsbTransport sUsbTransport;
69+
70+
MIDI_CREATE_INSTANCE(UsbTransport, sUsbTransport, MIDI);
71+
...
72+
```
73+
74+
become in `5.0.0`
75+
76+
```c++
77+
#include <USB-MIDI.h>
78+
USBMIDI_CREATE_DEFAULT_INSTANCE();
79+
...
80+
```
81+
82+
Start with the [NoteOnOffEverySec](https://github.com/lathoub/Arduino-USBMIDI/blob/master/examples/NoteOnOffEverySec/NoteOnOffEverySec.ino) example that is based on the original MidiUSB [sketch](https://github.com/lathoub/arduino_midi_library/blob/master/examples/MidiUSB/MidiUSB.ino). Note the only difference is in the declaration.
83+
84+
The [USB-MIDI](https://github.com/lathoub/Arduino-USBMIDI) Arduino library depends on [this library](https://github.com/FortySevenEffects/arduino_midi_library) and the [MIDIUSB](https://github.com/arduino-libraries/MIDIUSB) library.
85+
86+
[USB-MIDI](https://github.com/lathoub/Arduino-USBMIDI) uses the latest Arduino IDE `depends` feature in the `library.properties` file installing all the dependencies automatically when installing from the IDE.
87+
88+
## Other Transportation mechanisms
89+
90+
Version 5 of this library, allows for other Transportation layers than the original MIDI 1.0 Electrical Specification.
91+
92+
- [USB-MIDI](https://github.com/lathoub/Arduino-USBMIDI)
93+
- [AppleMIDI or rtpMIDI](https://github.com/lathoub/Arduino-AppleMIDI-Library)
94+
- [ipMIDI](https://github.com/lathoub/Arduino-ipMIDI)
95+
- [BLE-MIDI](https://github.com/lathoub/Arduino-BLE-MIDI)
96+
97+
All these Transportation layers use this library for all the underlying MIDI work, making it easy to switch transport protocols or making transport protocol bridges.
98+
5399
## Documentation
54100

55101
- [Doxygen Extended Documentation](https://fortyseveneffects.github.io/arduino_midi_library/).

0 commit comments

Comments
 (0)