You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,29 @@
1
1
# usbd-midi
2
2
3
-
A simple USB MIDI device class for [usb-device](https://crates.io/crates/usb-device).
3
+
A USB MIDI device class implementation for [usb-device](https://crates.io/crates/usb-device) based on the [USB Device Class Definition for MIDI Devices](https://www.usb.org/sites/default/files/midi10.pdf) specification.
4
4
5
-
Currently this aims to be a very simple implementation, that allows the microcontroller to send or receive MIDI information to/from a host like a desktop computer.
5
+
This class allows the device to exchange MIDI messages with a host like a desktop computer. It requires the use of a driver (e.g. a HAL) that implements the `usb-device` traits.
6
6
7
-
This crate requires the use of a HAL that implements the `usb-device` traits.
7
+
**NOTE:** only MIDI 1.0 protocol is currently supported.
8
8
9
-
## Example
9
+
## Message Types
10
+
11
+
While the crate focuses on transfer functionality, it provides some basic message types with conversions for convenience. These types are gated behind a `message-types` feature, which is enabled by default.
12
+
13
+
For more complex use cases, it is recommended to use a specialized crate like [midi-types](https://crates.io/crates/midi-types) or [wmidi](https://crates.io/crates/wmidi) and interface with it by using the raw event packet bytes. The [ESP32-S3 example](examples/example-esp32s3/) shows how to do this in detail.
14
+
15
+
## Examples
16
+
17
+
The example below shows some basic usage without any platform-dependent parts. Please refer to the [examples](examples/) directory for code that can be run on real hardware.
10
18
11
19
### Receive MIDI
12
20
13
-
Turn on an LED as long as note C2 is pressed. The example only shows the hardware-independent parts.
0 commit comments