It might be an overkill, but something like this is
very easily done with
SuperCollider (or Chuck or Pd for that matter).
hey, i have just started using sc!
I'll ask on the sc list for some
code. Thank you!
In the meanwhile i found pyrtmidi - python bindings for rtmidi, which i
could use in a gizmod script; i already was able to type letters with
the buttons of my device using gizmod, but till now i didn't know of a
way of outputting midi from python. Btw i don't know python either but
it seems to me i could easily learn - at least easier than a C alsa or
jack api.
Renato