{"id":25629144,"url":"https://github.com/lathoub/Arduino-USBMIDI","last_synced_at":"2026-06-10T09:30:21.825Z","repository":{"id":48817964,"uuid":"245603667","full_name":"lathoub/Arduino-USBMIDI","owner":"lathoub","description":"Allows a microcontroller, with native USB capabilities, to appear as a MIDI device over USB to a connected computer","archived":false,"fork":false,"pushed_at":"2022-03-26T22:18:31.000Z","size":98,"stargazers_count":170,"open_issues_count":10,"forks_count":11,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-02-12T02:44:57.808Z","etag":null,"topics":["arduino","arduino-library","arduino-midi-library","midi","midi-controller","midi-device","teensy","usb-midi"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lathoub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-07T09:28:38.000Z","updated_at":"2025-02-06T11:39:22.000Z","dependencies_parsed_at":"2022-09-23T22:10:09.987Z","dependency_job_id":null,"html_url":"https://github.com/lathoub/Arduino-USBMIDI","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lathoub%2FArduino-USBMIDI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lathoub%2FArduino-USBMIDI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lathoub%2FArduino-USBMIDI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lathoub%2FArduino-USBMIDI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lathoub","download_url":"https://codeload.github.com/lathoub/Arduino-USBMIDI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240222473,"owners_count":19767458,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","arduino-library","arduino-midi-library","midi","midi-controller","midi-device","teensy","usb-midi"],"created_at":"2025-02-22T19:17:03.547Z","updated_at":"2026-06-10T09:30:21.723Z","avatar_url":"https://github.com/lathoub.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# Arduino USB-MIDI Transport \n[![arduino-library-badge](https://www.ardu-badge.com/badge/USB-MIDI.svg?)](https://www.ardu-badge.com/USB-MIDI) \n\nThis library implements the USB-MIDI transport layer for the [FortySevenEffects Arduino MIDI Library](https://github.com/FortySevenEffects/arduino_midi_library) and uses the underlying [Arduino MIDIUSB](https://github.com/arduino-libraries/MIDIUSB) library (so only devices working with MIDIUSB, will work here).\n\nAlternative library: see also [Adafruit's TinyUSB Library for Arduino](https://github.com/adafruit/Adafruit_TinyUSB_Arduino) for ESP32, mbed_rp2040, ArduinoCore-samd and Pico\n\n## Installation\n\n\u003cimg width=\"800\" alt=\"Screenshot 2020-04-25 at 09 42 19\" src=\"https://user-images.githubusercontent.com/4082369/80274232-42810b80-86d9-11ea-94f6-643bf5ade5be.png\"\u003e\n\nThis library depends on the [Arduino MIDI Library](https://github.com/FortySevenEffects/arduino_midi_library) and [Arduino's MIDIUSB](https://github.com/arduino-libraries/MIDIUSB).\n\nWhen installing this library from the Arduino IDE, both will be downloaded and installed in the same directory as this library. (Thanks to the `depends` clause in `library.properties`)\n\nWhen manually installing this library, you have to manually download [Arduino MIDI Library](https://github.com/FortySevenEffects/arduino_midi_library) and [MIDIUSB](https://github.com/arduino-libraries/MIDIUSB) from github and install it in the same directory as this library - without these additional installs, this library will not be able to compile. \n\n## Usage\n### Basic / Default\n```cpp\n#include \u003cUSB-MIDI.h\u003e\n...\nUSBMIDI_CREATE_DEFAULT_INSTANCE();\n...\nvoid setup()\n{\n   MIDI.begin(1);\n...\nvoid loop()\n{\n   MIDI.read();\n```\nwill create a instance named `MIDI` (transport instance named `__usbMIDI`) and is by default connected to cable number 0 - and listens to incoming MIDI on channel 1.\n\n### Modified\n```cpp\n#include \u003cUSB-MIDI.h\u003e\n...\nUSBMIDI_CREATE_INSTANCE(4);\n```\nwill create a instance named `MIDI` (transport instance named `__usbMIDI`) and is connected to cable number 4.\n\n### Advanced\n```cpp\n#include \u003cUSB-MIDI.h\u003e\n...\nUSBMIDI_NAMESPACE::usbMidiTransport usbMIDI2(5);\nMIDI_NAMESPACE::MidiInterface\u003cUSBMIDI_NAMESPACE::usbMidiTransport\u003e MIDI2((USBMIDI_NAMESPACE::usbMidiTransport\u0026)usbMIDI2);\n```\nwill create a instance named `usbMIDI2` (and underlaying MIDI object `MIDI2`) and is by default connected to cable number 5.\n\n## Tested boards / modules\n- Arduino Leonardo\n- Teensy 4.1 (incl MIDI, MIDIx4 and MIDIx16)\n\n### Boards / modules in development (help needed)\n- Arduino NANO 33 BLE\n- nRF52832 Bluefruit Feather\n\n## Memory usage\nThe library does not add additional buffers and is extremely efficient and has a small memory footprint.\n\n## Other Transport protocols:\nThe libraries below  the same calling mechanism (API), making it easy to interchange the transport layer.\n- [Arduino AppleMIDI Transport](https://github.com/lathoub/Arduino-AppleMIDI-Library)\n- [Arduino ipMIDI  Transport](https://github.com/lathoub/Arduino-ipMIDI)\n- [Arduino BLE-MIDI  Transport](https://github.com/lathoub/Arduino-BLE-MIDI)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flathoub%2FArduino-USBMIDI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flathoub%2FArduino-USBMIDI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flathoub%2FArduino-USBMIDI/lists"}