[PD] Key-repeat makes keyboard-pianokeys impossible?

Chuckk Hubbard badmuthahubbard at gmail.com
Mon Jul 17 20:07:22 CEST 2006


On 7/17/06, carmen <_ at whats-your.name> wrote:
> On Mon Jul 17, 2006 at 01:15:05PM -0400, Chuckk Hubbard wrote:
> > I don't see how it would be possible
>
> oh please. defeatists never win!
>
> you could either use [change] or an [==], comparing the current and previous key. does it really send the keyup and then the keydown again for each repeat? if so you could filter it out based on the elapsed time.

But repeating the same note is really common, and [change]  or [==]
alone would filter that too.  And elapsed time alone wouldn't work
either, since it is common to hit several notes at once.  So you'd
have to compare both the key number and the time from its last hit.
You couldn't just ignore any one key for a certain span after it is
hit, because then it would start retriggering after that duration.
And there is typically a delay after the first key-down before it
starts repeating, so the duration would have to be long enough not to
catch the following key-up.


One dirty solution, for the time being (Luke), would be to hold down
another key and then play.  If you hold one key down and start
pressing others, nothing repeats.  Just make sure that key isn't
mapped to a note, since it might be interrupted before a key-up.


>
> and check the Tk docs for key input, maybe theres some interesting flags there..
>
> c
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>


-- 
"Far and away the best prize that life has to offer is the chance to
work hard at work worth doing."
-Theodore Roosevelt




More information about the Pd-list mailing list