BASSMIDI enables the playback of MIDI files and custom event sequences, using SF2 and SFZ soundfonts to provide the sounds. It also includes support for MIDI input. It can be downloaded from the BASS website:

The BASSMIDI.CHM file should be copied into the same directory as this file (BASS.CHM), to be able to conveniently access the BASSMIDI documentation from within this BASS documentation.