Hi,

swamynathan wrote:
hello,
im making a virtual piano in python where on key stroke a wav is played from a location now to implement a fully functional piano i need to have multiple key stroke captures ie if 2 or 3 keys pressed then the function which playes the wav is called with 3 parameters


how to implement this or any other suggestion(i was asked to try multi threading which dint seem optimal)

Are you trying to do this with a computer keyboard or with an
attached midi or usb music keybord? If the former, you are probably
w/o luck because afaik there is no way to track the event
of having random keys pressed the same time.
(Last time I did it was with a real C=64 where you have access
 to the key matrix)

If you manage to receive the keypress events, multithreading is
probably easiest to do but it really depends on the way you
play the sounds - at least the playback needs to be asynchronously
so you can catch note-on, note-off events during playback.

Good luck
Tino

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to