beginning of port from midikit https://code.google.com/p/midikit
Merge branch 'master' of https://github.com/jtee/cmidid-kerneldriver