hi.
you could have a look at my own MIDI program for the OPL3:
http://fm801.kewl.org/
this isn't for DOS but has been tested to work in Windows 95
and later. 95 and 98 are not ideal though and XP is preferred
if all features are enabled.
this program uses a hardware OPL3 or compatible synth in
windows up to XP but can support the MAME emulator mentioned
by stiletto above where hardware isn't available, such as
windows 7 or linux wine. this emulator is distributed
separately here:
http://dev.kewl.org/misc/ymf262/
for real time control of the chip, you would utilise midi CC
and this can be aided by in the built-in LFO which can automate
that process somewhat. for an external clock source you
could utilise midi-ox for example, or use the built-in clock.
you will need a MIDI keyboard to control it or a virtual one
such as VMPK along with a MIDI loopback driver such as
maple midi for example.
good luck, bye.
PS. you may enjoy the virtual circuit bender which of course
works even with the MAME virtual synth.