I use the Midi Toolkit from Leslie Sanford. I can send midi messages without problems. But I can't receive any message.
When I send a "note on" with sendmidi.exe dev "loopMIDI Port2" ch 13 on 13 42 (tool url: https://github.com/gbevin/SendMIDI)
I can see the message in Midi-OX but with the Midi Toolkit I can't receive it (I close Midi-OX befor I use the port myself).
I open the InDevice with midiIn = new InputDevice(0, true, false); // 0 is for example "loopMIDI Port2"
and install some handler (Channel, sysex, error) - here is the standard MessageReceived:
midiIn.MessageReceived += HandleMessageReceived;
private void HandleMessageReceived(IMidiMessage message) { ... }
I can rule out sending the message to a wrong port.
I saw that midiOpen and midiClose event works (in InputDevice.HandleMessage) if (msg == MIM_OPEN) and if (msg == MIM_CLOSE) ...
I don't understand, why receive doesn't work.
I used NAudio befor but the MIDI_IO_STATUS isn't set that is nessessary for SysEx messages. I can't compile the NAudio project.
Has anyone a tip for me?