you can buy a midi to USB cable ,
Most computer music is recorded into the computer with a separate Sound card or interface. for example a focus rite sapphire, or alexis io4
and this would have various inputs such as midi, xlr , and 1/4 " jack sockets