[PD] polyphonic ? key, keyup setup question

Christopher Charles schraubzwingenhalterung at web.de
Thu Oct 5 12:55:32 CEST 2006

Frank Barknecht wrote:
> Attached is another way to get at keyboard data in Pd that is suited
> to be used to built a midi-keyboard from a standard PC keyboard. It
> involves an abstraction "keytrans.pd" which should be used with two
> argument as [keytrans <keyname> <midi note>] and will output a list of
> "<frequency> <keypress state as 0 or 1>" if the respective key passed
> as <keyname> is pressed or released. It's a good example for when
> an abstraction can save a lot of typing and connecting work.
> Ciao
nice work! i altered your keytrans.pd a little bit and added a 
retrigger-filter to it, in order to make it independent from changing 
the keyboard retrigger rate on the system and make it work out of the 
box. release-events for keys are only let through if no trigger-event 
for the same key occurs within 50 ms. this of course implies a 50 ms 
latency on releases, but on synths with a percussive envelope, this 
won't be too audible. the 50 ms delay work fine for me, but YMMV.

while experimenting with chords on the keyboard, i added 4 more voices 
to my local copy of the help/test-patch. i found that it is possible to 
play some 7-voice chords like 'asdfzhk' (interesting chord name ;) but 
some other keys would not combine as well, for example the only other 
key i could play in addition to 'fg' was 'z', other 3-voice chords based 
on 'fg' did not work. operating system weirdness? hardware weirdness? i 
don't know, but it renders a "polyphonic" pc-keyboard kinda useless for 
musical use if certain combinations of 3 notes aren't possible.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: keytrans.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20061005/95bf7517/attachment.txt>

More information about the Pd-list mailing list