±12V protection for MIDI output
The purpose of the 220 Ω resistors is to limit the current to about 5 mA when connected to a receiver that complies with the MIDI specification.
If you replace these resistors with a BJT-based current source/sink, you get the same current limit even if connected to wildly different voltages, and the voltage drop over Q1+R1 and Q3+R3 is smaller so that you can afford to insert diodes to protect against reverse voltages:
(There are devices that use a MIDI output as power supply and try to draw more than 5 mA; consider making R3 smaller.)