This topic is written mainly as guide for General MIDI (GM) Sequence Programmers.
There is a complete list of MIDI messages, with an explanation of their use.
Also, I have included some technical specifications and a PC-MIDI interface circuit.
When using these sequences live, there must never be any "surprises" in the songs.
When I first started programming sequences, I was frustrated when using many sequences in succession to have songs which sounded right at home, foul up in various ways when playing live.
The simple cause is that a song can leave your sound module in a variety of states when it finishes.
Whether it finishes normally at the end of a song, or you manually stop a song part way through, you could leave the sound module with varying volume levels on different channels, unwanted pitch bend ranges, 'half-way' through a pitch bend, etc.
If you don't properly reset your sound module at the start of every song, it will play with the previous song's settings!
General MIDI defines how various MIDI messages, in particular patch sounds and controller messages, are used in a standardised way, so that any MIDI sequence will sound similar on any manufacturer's sound module conforming to the General MIDI specification.
A General MIDI sound module must be capable of playing 16 different sounds simultaneously, one on each MIDI channel 1 to 16.
Percussion sounds are played on channel 10 (different notes play the different percussion sounds), while the other 15 channels are used for instrumental sounds.
The specification defines the types of sounds (eg piano, strings, brass, etc) which are available in the 128 possible instrumental sound patches, and also which notes on channel 10 should produce each of the percussion sounds (eg bass-drum, snare, cymbal crash, etc).
I have not listed those sounds here, they are readily accessible in your sound module's handbook.
There are several 'enhancements' to General MIDI, and unfortunately there has been little standardisation between manufacturers on this.
In the tables below, I have shown either GM to indicate a message that is truly General MIDI, and GS for the original Roland enhancements, which are usually adopted as part of the GM specification by other manufacturers.
Obviously, you should read your sound module manual to confirm which messages are supported, but anything labelled GM or GS can be considered as a suitable option when writing your GM sequences.