Jens M Andreasen <jens.andreasen(a)comhem.se> writes:
Do you have any midi-keyboard around? Because stdio
won't tell you that
a key has been released, only that it has been hit. This limits the "toy
Casio experience" somewhat ... There is of course a workaround - given
that you have root permission, you could read the keyboard
from /dev/input/ instead. This is unfortunately a bit like having a
"keyboard sniffer" installed, which may not be ideal in your
environment. Next step up the ladder I think is fullblown X ...
There was a very nice curses based midi keyboard for OSS, called
midikb or something like that. It solved this problem very neatly by
allowing you to switch between a few different modes. IIRC one was to
send note off when a new key was pressed (ie like a monophonic synth),
one was to always play each note for a set time, and last I remember
was to press key a second time for note off.
I wonder what happened to that application. It used to be in Debian. I
used it all the time. Often these modes of playback made it easier to
play some parts than a real midi keyboard (or vkeybd). On the other
hand of course at other times it was annoying that it could not function
more like a real midi keyboard. I think/hope I have the source somewhere.
Even did some modifications to it to send specific control change event
easily for some hardware synth I used at the time.
--
/Pelle