The buffer is a piece of inexpensive sacrificial circuitry, akin to a fuse, which can be replaced more easily than the processor. Because the connector goes to the outside world, it's possible that it could be shorted, connected incorrectly, or experience an ESD event.
They are capable of lighting the LEDs directly, but the buffer is still sensible. Modern microcontrollers, like the Atmel AVR, have much more robust pin circuitry.
The pair of inverters are an inexpensive way to increase the signal drive strength. On older microcontrollers, the I/O pins were relatively weak, and couldn't source or sink enough current to light the LED in the optocoupler. The hardware is relatively simple - the UART transmit line simply runs to a pair of logic inverters. MIDI OutĪt the bottom of the schematic is the transmitting hardware, behind the MIDI Out jack. We'll explain more about how the optoisolator works below, but first we need a MIDI output to connect to it.