I got MIDI working in Master of Magic!
kingfissure's suggestion to add my user to the audio group solved the problem with dosemu and aconnect. Here's what finally worked:
$ sudo modprobe snd-virmidi
$ ln -s /dev/snd/midiC2D0 ~/.dosemu/run/dosemu-midi
$ aconnect 24 128
$ aoss dosemu
midiC2D0 is the virtual MIDI device 24:0. MIDI device 128:0 is the timidity server.
It's gone back to cutting off long PCM sounds after a few seconds. Maybe that can be tweaked. Anyway, It's much better than dosbox!