|MIDI out connection||MIDI in connection|
|pin 4 = -ve or sink||pin 4 = +ve or source|
|pin 5 = +ve or source||pin 5 = -ve or sink|
This is why all devices (instruments, controllers) have female sockets.
And all cables (except those explicitly designed as extension cables) have male plugs.
This ensures the correct electrical contacts without having to label ends.