From the ALSA wiki
A MIDI cable is a special cable for connecting one MIDI device to another MIDI device. Follow the link for more details of MIDI. At each end of a MIDI cable there is a finger-sized round connector with either 5 metal pins inside (a "male DIN connector") or 5 oblong slots (a "female DIN connector"). MIDI cables up to 15m long are available although it is possible to connect two or more 15m cables together to cover a distance of more than 15m (a MIDI line driver may be necessary for distances over 30m). How to wire a MIDI connector is described here.
Retrieved from "http://alsa.opensrc.org/MIDI_cable"