ReceiveMIDI
ReceiveMIDI copied to clipboard
Multiple devices with same name
Hi, I'm looking to "proxy" traffic from one computer, to a MIDI keyboard, through a combination of receivemidi
and sendmidi
so I can spy on the traffic and use this wonderful swiss army knife to reverse engineer some sysex commands. I may be over-complicating this, so bear with me if there's a simpler solution.
Here's my proposed connection setup:
Windows Computer Running Proprietary Editor Software -> (LINUX with receivemidi (USB MIDI Device 1), data piped to sendmidi (USB MIDI DEVICE 2) ) -> Keyboard
And in reverse as well. This way my linux machine is in-between and can log the conversation, run scripts, etc. I really like this tool so trying to find a way...
This seems like it would work, however, the receivemidi/sendmidi only allow me to use device name, rather than an ID. Unfortunately, in my development setup, I have two MIDI usb devices that are the same make/model and same name:
Output from aplay -L
...
usbstream:CARD=S3
Sound Blaster Play! 3
USB Stream Output
sysdefault:CARD=Tab
Default Audio Device
usbstream:CARD=Tab
E-MU XMidi1X1 Tab
USB Stream Output
sysdefault:CARD=Tab_1
Default Audio Device
usbstream:CARD=Tab_1
E-MU XMidi1X1 Tab
USB Stream Output
Output from receivemidi list
and sendmidi list
:
Midi Through Port-0
E-MU XMidi1X1 Tab Out
E-MU XMidi1X1 Tab Out
I did try launching them successfully, hoping to get away with something, but it always selects the first device (although two instances can open the same card, which could be useful).
Is there a a way to use an index, or a flat out device id (ex: /dev/snd/midiC3D0
)? I tried, but wasn't able to find a workaround. Maybe an option like receivemidi devindex 2
in my case? It would need to be checked each time because the cards can move around, but that would be really useful for some swiss army knife action using this tool.
From what I saw there weren't any good alsa tricks for this, so it seems like an index param in the tools would be a fairly easy feature to implement.
I know I can always find/buy/use a different midi device, but where's the fun in that? :)
Anyway, thanks for a great piece of software, I've used it on other projects and it came in super useful, especially the send clock features, that was a life-saver.