All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
This release focuses on improving the internal message data types and their usage.
Message
enum variants for System Common and System Realtime messages.U14
primitive value type used by Pitch Wheel and Song Position Pointer messages.- Derive
Debug
,Clone
,Eq
, andPartialEq
forU4
. - Derive
Debug
,Clone
,Eq
, andPartialEq
forInvalidU4
. - Derive
Debug
,Clone
,Eq
, andPartialEq
forInvalidU7
. - Derive
Debug
,Clone
,Eq
, andPartialEq
forPayload
. - Derive
Debug
,Clone
,Eq
, andPartialEq
forRaw
. - Re-exports of common data types in the
message
module.
- Changed pitch wheel
Message
variant fromPitchWheelChange(Channel, U7, U7)
toPitchWheelChange(Channel, U14)
. UseU14::from_split_u7
andU14::split_u7
functions for conversions.
This release focuses on:
- Increased usability by simplifying the internal module structure.
- Interfacing with third-party crates like
midi-types
. - Support for System Exclusive messages (SysEx).
Important:
- The
message
module containing theMessage
struct and related types is now gated behind themessage-types
feature. This feature is enabled by default. - The constants
USB_AUDIO_CLASS
,USB_AUDIOCONTROL_SUBCLASS
andUSB_MIDISTREAMING_SUBCLASS
are now private to prevent them from being used in the device setup. Doing so would lead to incorrect enumeration on certain hosts (e.g. macOS).
UsbMidiEventPacket::cable_number
function.UsbMidiEventPacket::header
function.UsbMidiEventPacket::payload_bytes
function.UsbMidiEventPacket::as_raw_bytes
function.UsbMidiEventPacket::to_raw_bytes
function.UsbMidiEventPacket::try_from_payload_bytes
function.UsbMidiEventPacket::is_sysex
function.UsbMidiEventPacket::is_sysex_start
function.UsbMidiEventPacket::is_sysex_end
function.TryFrom<&UsbMidiEventPacket>
implementation forMessage
type.Message::into_packet
function.Message::code_index_number
function.CodeIndexNumber::try_from_payload
function.CodeIndexNumber::payload_size
function.CableNumber::Cable0
as default value.FromOverFlow<u8> for U4
implementation.FromClamped<u8> for U4
implementation.- Re-exports of common items in crate root.
- Renamed
MidiClass
toUsbMidiClass
. - Renamed
UsbMidiClass::send_message
function toUsbMidiClass::send_packet
. - Renamed
midi_device
module toclass
. - Renamed
usb_midi
module topacket
and moved it into crate root. - Renamed
midi_packet_reader
module toreader
. - Renamed
MidiPacketBufferReader
toUsbMidiPacketReader
. - Renamed
MidiPacketParsingError
toUsbMidiEventPacketError
- Renamed
MidiReadError
toUsbMidiReadError
- Moved
usb_midi_event_packet
code into parentpacket
module. - Moved
channel
andnotes
modules intomessage
module. - Moved
message
module to crate root. - Moved
byte
submodules intomessage::data
module. - Moved
from_traits
code into parentdata
module. - Consolidated separate
InvalidCableNumber
struct intoUsbMidiEventPacketError
. - Consolidated separate
InvalidCodeIndexNumber
struct intoUsbMidiEventPacketError
. - Converted
CodeIndexNumber
struct to enum. - Moved descriptor constants into class module and made them private.
- Set edition to 2021.
UsbMidiEventPacket::cable_number
field, use function instead.UsbMidiEventPacket::message
field, useMessage::try_from(&UsbMidiEventPacket)
instead.UsbMidiEventPacket::from_midi
function, useMessage::into_packet
instead.CodeIndexNumber::find_from_message
function, useMessage::code_index_number
instead.From<CableNumber> for U4
implementation.From<CodeIndexNumber> for U4
implementation.
- Updated
usb-device
dependency to 0.3. - Updated
num_enum
dependency to 0.7.2. - Extended endpoint descriptors to 9 bytes as stated in specification.
- Removed unused
embedded-hal
andnb
dependencies.