I can now play midi with this tool.
But my SDL program still gives the error.
What still surprises me is why I can play the midis with an old SDL2_mix program.
To play MIDI files using Timidity, you'll need to get a complete set of GUS patches from:
http://www.libsdl.org/projects/mixer/timidity/timidity.tar.gz
and unpack them in /usr/local/lib under UNIX, and C:\ under Win32.
It looks like the OS and SDL_mix need to be adjusted.
You wrote above that this was removed for resource reasons.
I can’t really imagine this happening, a modern PC should have enough power.
After all, Win31 already had *.mid support. And this was the case at least from the 386 onwards.
17 MB extra is quite a bit if you consider the current size of the SDL_mixer library.
I have zero experience with midi but I noticed that the “GUS patches” has a copyright.txt that says some of the patches are only “for non-commercial use” which might be another reason why they’re not included by default.
Freepats seem to be a free alternative to the other “GUS patches” but it’s released under the GNU GPL so if it was included in SDL_mixer it would force all of SDL_mixer, and all projects that use it, to be released under the GNU GPL.
You shouldn’t need anything like that just to play MIDI. Obviously the quality of the resulting synthesis will depend on the size of the wavetables, the complexity of the ADSR envelopes etc., and for the very best results it’s going to be large. But a library to play MIDI with what many would call ‘acceptable’ quality should be small enough to be included as standard, I would have thought.
‘GUS patches’ sounds like it’s referring to Gravis UltraSound, but whilst they may be desirable for accurate emulation of the Gravis UltraSound hardware for the IBM PC, they’re not necessary simply to play MIDI files.