Brian Sorahan
2017-02-22 16:31:52 UTC
Hi all,
I am hoping to get some guidance on how to properly use the information I
get when I list MIDI devices.
I'm tinkering with this code
https://github.com/scgolang/midi/blob/d50a32b1725ae42044c84f02a53c69004926bd93/midi_linux.go#L94-L152
which seems to list MIDI devices ok.
But if I prefer to use the RawMIDI API to actually connect to the device is
this a reasonable way to formulate the device ID?
https://github.com/scgolang/midi/blob/d50a32b1725ae42044c84f02a53c69004926bd93/midi_linux.go#L125
I'm guessing there is a better way to implement this, but I'm pretty new to
the Sequencer API so I'm not sure what that better way might look like.
Does it even make sense to use the Sequencer API to list devices, but then
use the RawMIDI API to open, read, and write?
The code I'm sharing is hopefully readable for C programmers despite the
fact that it is Go.
Thanks in advance for any feedback!
I am hoping to get some guidance on how to properly use the information I
get when I list MIDI devices.
I'm tinkering with this code
https://github.com/scgolang/midi/blob/d50a32b1725ae42044c84f02a53c69004926bd93/midi_linux.go#L94-L152
which seems to list MIDI devices ok.
But if I prefer to use the RawMIDI API to actually connect to the device is
this a reasonable way to formulate the device ID?
https://github.com/scgolang/midi/blob/d50a32b1725ae42044c84f02a53c69004926bd93/midi_linux.go#L125
I'm guessing there is a better way to implement this, but I'm pretty new to
the Sequencer API so I'm not sure what that better way might look like.
Does it even make sense to use the Sequencer API to list devices, but then
use the RawMIDI API to open, read, and write?
The code I'm sharing is hopefully readable for C programmers despite the
fact that it is Go.
Thanks in advance for any feedback!