Skip to content

Commit 13a8701

Browse files
committed
README update
1 parent 7ae86de commit 13a8701

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
# usbd-midi
22

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.
44

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.
66

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.
88

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.
1018

1119
### Receive MIDI
1220

13-
Turn on an LED as long as note C2 is pressed. The example only shows the hardware-independent parts.
21+
Turn on an LED as long as note C2 is pressed.
1422

1523
```rust ignore
1624
use usb_device::prelude::*;
1725
use usbd_midi::{
18-
message::{channel::Channel, notes::Note},
19-
Message,
26+
message::{Message, Channel, Note},
2027
UsbMidiClass,
2128
UsbMidiPacketReader,
2229
};

0 commit comments

Comments
 (0)