There are actually 4 ways manufacturers do it. Something like the Disaster Area Designs[1] MIDI Box is a necessity once you start dealing with guitar effects pedals.
That looks brilliant. I thought there were only 2 ways. I really think that MIDI device makers need to be actively bullied into providing DIN MIDI even if they want to stick USB or the 1/8" jacks on too for whatever reason.
I've had A/B solved by just schottky rectifier and low enough current optocoupler, but damn ,didn't knew there is even more to that mess
I solder two TRS jacks back to back, squirt hot snot into the gap, and shrink some shrink tube around it…it’s about $0.20 of materials and five minutes work.