MIDI in missing note off events

What did I do to my poor zynth?

I’ve noticed zynth doesn’t like note off events from one of my boards using the MIDI in port. I have an evolution MK-449C. It works perfectly with USB. but not on the din MIDI. Other boards work fine on zynth DIN MIDI. e.g. my poly 800, and if I put the MK-449 directly to the poly midi in that works fine too. If I put the MK-449 to zyn din MIDI in and take the thru to the poly then the note off events get filtered out.

What is this weirdness?

Just to be clearer. I can see NOTE OFF events in the log from the poly, but not from the MK. but then I can’t from my mininova either, but that seems to send “note on vel 0” to stop a note.

Could you check con a MIDI logger tool different from Zynthian to see if it’s a Zynthian-router related problem?

Plugging the MK directly to other synths via din works fine, Is there a logger available in Aruk?

Plugging synths to THRU din works too. I had it on OUT before. :man_facepalming:

Perhaps this may help?

1 Like

Further testing shows I can get it to register note off if I hold the key for one second. If I press another key within one second It misses note on.

I’ve seen similar with the USB motor 61 but strangely not on midi in…

I installed midisnoop on the zynth. The MK-449C sends Active Sense through the DIN socket, but not through the usb. I’m going to guess that the tty software is unable to read the note off information and the Active Sense messages coming in so rapidly because the MIDI thru works fine with it and that’s a direct electrical connection. My other synths dont send Active Sense.


So we need Active Sense detection? Please open a github task.

Maybe? or can we up the scan rate for ttymidi:MIDI-in? as I’m not seeing the note off on the jack port before it gets to the zyn midi router, I wonder if the issue is in the MCP23017.

I have another board that sends Active Sense and a constant midi clock, and that works fine, that one sends note on/off rather than note on 127/0 though.

It is likely that you are suffering a shortcoming of ttyMIDI. It does not support Running Status. Each time the message type changes, e.g. note on to note off then the status byte is sent but the status byte is omitted if same, e.g. note on to note on. As your controller sends note on with velocity zero, the status Bute may not be sent which confuses ttyMIDI. It is one of the reasons I have avoided using it in my projects. I suggest raising an issue in the Zynthian issue tracker. @jofemodo can decide whether to report upstream or consider a different MIDI library.

1 Like

I’ll open an issue. Is there another MIDI library available I can test this theory with? It doesn’t explain why the mininova, which also sends note on 0 velocity but doesn’t send Active Sense, works fine :confused:

Oh, Status byte! I think I understand now, thank you. The mininova must send the status byte everytime but the MK-449C only sends a status byte then subsequent data bytes which are ignored. I’d be willing to bet that after 1s the MK will send another status byte again which is what I’m seeing.

I am not aware of a drop-in replacement for ttyMIDI.

It is possible that the miniova does not send running status. This may be detailed in the user manual.

What about using ALSA snd-serial?

Please, test it and see if it works better … :wink:

I think it’s just for a specific uart chip

Currently we are using a little bit outdated version of mod-ttymidi. That’s because @C0d3man discovered some problems related with the latest version and some keyboards. Perhaps you could try with the latest one and see if your problems get solved :wink:

I’m surprised nobody has fixed ttymidi. If I recall correctly, running status is required by the MIDI spec, and it isn’t hard to implement.

Away you go! https://github.com/moddevices/mod-ttymidi

What about catting the output of the serial port through amidi?

I’m off to try something stupid.

Well I tried to blindly copy data from the serial port into jack but it didn’t work.