Multi channel optocoupler
The TLP521-4, LTV-847, and SFH6916 are simple transistor optocouplers, which means that they are too slow to reliably work for MIDI.

In any case, such a quad DIP optocoupler does not save space because four PC817s would occupy exactly the same space.

It is not possible to omit the 220&nbsp;Ω resistor because it is needed to limit the current to 5&nbsp;mA.
Similarly, it is not possible to omit the protection diode because all optocoupler LEDs are sensitive to reverse voltages. (Only the HCPL-2602 has the protection diode built in, but it's overkill, and does not save space.)

The HCPL-2630 would be a two-channel 6N137.
But you can do better: to really save space, go to SMD. And to avoid the pull-up resistor at the output, use an optocoupler with a CMOS output, such as the TLP2361, ACPL-M61L, FODM8071, or PS9151.