The MIDI spec provides a neat piece of hardware for just this occasion – the MIDI thru box. The only thing you need to build a single MIDI thru box is an opto-isolator and a buffer. It’s easy ...
Finally, we get a look at a proper schematic at the four minute mark which details the pull-up resistors, hardware reset circuit, and the optoisolator he added for the MIDI connections themselves.