greatscottgadgets / python-usb-protocol

python library providing utilities, data structures, constants, parsers, and tools for working with USB data
BSD 3-Clause "New" or "Revised" License
56 stars 32 forks source link

emitters/descriptors: re-add midi1 emitters #36

Closed vk2seb closed 7 months ago

vk2seb commented 7 months ago

It seems like the convenience emitters for midi1 got deleted a while ago in this change - https://github.com/greatscottgadgets/python-usb-protocol/commit/ad2e7e7d891345c91195e4442dac2ce83fc6af0c

They were originally added in this PR: https://github.com/greatscottgadgets/python-usb-protocol/pull/14

Can we re-add them? The version in this PR is taken from here: https://github.com/amaranth-farm/python-usb-descriptors/blob/master/usb_protocol/emitters/descriptors/midi1.py

I have tested this PR on one of my own projects and the MIDI device enumerates fine when constructed with these emitters.

Thanks again @hansfbaier for the hard work getting audio + midi descriptors in and functional :)

antoinevg commented 7 months ago

Thank you!