The MIDI standard supports the main elements of music as follows:
each note is given a number
separate note-on and note-off messages can be sent to allow complete control over timing.
Several notes can be switched on simultaneously. Due to the speed of the link it can appear that several events happen simultaneously.
note-on messages can have a volume level
Messages are defined to switch voices.