This is pretty much exactly what amidi does. The
writing
itself can be done trivially with
snd_rawmidi_open/snd_rawmidi_write/ snd_rawmidi_close. To
get the device name of the control port, you have to
enumerate the MIDI ports; see the device_list function.
Thanks Clemens for the pointer. I'll make usage of the OSS
advantage and study the code of amidi ;-) .
Best regards
ce