It's possible, but so far, no external plugin framework is implemented for rawmidi. The external plugins are available only for PCM and control APIs. I guess it'd be relatively easy to add the external rawmidi plugins, though.
How can I start adding an external rawmidi plugin? As you said, there is no framework ready yet. So, first a framework has to be created so that external plugins can be added the same way one would add PCM or control type plugins. It might sound a little naive but I am not familiar with the framework part of it, but it looks interesting.
1. I think for finding out what the plugin framework would consists of I need to have a look at alsa-lib and modify it too, is it correct?. If such a framework is created then will the control flow look like this:
amidi/aplaymidi ->alsa-lib with midi plugin framework->my_midi_plugin
Can you point me to some code/doc etc which might serve as start point, basically how do I go about adding such a framework and finally, how user is going to use it with newly added plugin? (i.e. for pcm io type plugin we use #aplay -D my_plugin test.wav, will it be similar for midi plugin also?)
-Pharaoh.