This is a rough patch which implements portmidi Input support for ZynAddSubFx
http://en.wikipedia.org/wiki/PortMidi
The reason for this was that for some reason ZynAddSubFX 2.2.1 was not playing anything for me with MIDIIN set for ALSA, on my Ubuntu 7.10 machine. Since I already had written a sample portmidi application which was successfully reading through alsa as the underlying layer on this machine, I went ahead and made ZynAddSubFx use the portmidi library.
Things to improve:
1. Check the controller and pitch messages to make sure they are implemented completed. My keyboard doesn't have these.
2. Consider tweaking the usleep interval in the included src/PMMidiIn.C, and perhaps eliminate if possible though I don't think so. This is needed to keep CPU load low, otherwise Pm_Read calls will keep spinning.
3. Deal with the path issue for finding porttime, portmidi, and/or asound and other underlying libs that portmidi depends on. I would recommend updating ZynAddSubFX to use autoconf/automake to help here.
I used a 17-Jan-2007 release of portmidi to try this against.
Developed against 2.2.1 however this patch will apply to a CVS snapshot around 06Apr2008