[linux-audio-dev] Re: C++ Keyboard Event Handling

From: Carlo Capocasa <capocasa@email-addr-hidden>
Date: Fri Jan 20 2006 - 14:44:03 EET

Hi David! Thanks for your reply! I'm impressed with your credentials, too :)

> That is, MIDI output, as in sending MIDI messages to an onboard or
> external hardware synth, or a softsynth running in the driver or as a
> separate application? (As opposed to generating "wave" audio in your
> application.)

MIDI output, sending events to the ALSA sequencer, and from there to the
softsynths...

> Anyway, keybord input is done by handling "press" and "release"
> events. When you get a "press" event, you set some state variable for
> the corresponding key to "down", and when you get a "release" event,
> you clear that state variable.

Sounds great! Do you have a code example?

> SDL also has an alternative API that has this logic built in:
> SDL_GetKeyState():

Hm, I'm wondering if I could do this sticking to C++ builtins...

Carlo
Received on Fri Jan 20 16:15:08 2006

This archive was generated by hypermail 2.1.8 : Fri Jan 20 2006 - 16:15:08 EET