chris-zen / coremidi

CoreMIDI library for Rust
https://chris-zen.github.io/coremidi/coremidi/
MIT License
75 stars 20 forks source link

Add a function to create a Source from a unique id. #50

Closed akhudek closed 4 months ago

akhudek commented 5 months ago

I wanted to be able to create a source from a unique id. The advantage of this over using name or index is that the unique id is unique to the device, even if more than one of the same device is plugged in, and it persists across reboots and device disconnects.

Also, this allows you to create a source for a device even if it's not currently plugged in. In my testing MacOS will automatically start sending midi messages to your listener once the device is plugged in.

chris-zen commented 4 months ago

Thanks @akhudek !!!