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

Martin Peach martin.peach at sympatico.ca
Wed Jul 19 00:36:30 CEST 2006


Frank Barknecht wrote:
> Hallo,
> Roman Haefeli hat gesagt: // Roman Haefeli wrote:
>
>   
>> sorry to bother you again with this, but now i am getting very curious
>> why the quantisation of x-events (from mouse or keyboard) is so big in
>> my pd on my system and yours is so ok.
>>  
>> again, my 'xset q':
>> auto repeat delay:  500    repeat rate:  30
>>
>> and pd measures:
>>
>> print: 512
>> print: 0
>> print: 0
>> print: 0
>> print: 0
>> print: 0
>> print: 85.3333
>> print: 0
>>     
> ...  
>   
>> these values are NOT ok, are they? (512 = 6 * 85.3333)
>>     
>
>   
The first value is the delay until the first repeat. What is your audio 
sample rate?

I expect that 85.3333 should be some multiple of that.


> Hm, these values do look suspicious indeed. Unfortunatly I cannot
> reproduce them. Do you have any "exotic" settings in regard to
> blocksize or samplerate? Maybe someone else can test this as well?
> Test patch is attached.
>
>   

At 44.1 kHz sample rate, 64 samples (one block) take 1.4512ms.
On WinXP with (Control Panel->Keyboard->Speed = Fastest) I get:

With audio on, 5ms nominal delay: mostly 17.415 (= 12 * 1.4512) and 
23.220 (= 16 * 1.4512), a jitter of exactly 4 blocks.
Audio off, 5ms nominal delay, mainly:
30.4762 = 21 * 1.4512
31.9274 = 22 * 1.4512
That is, a jitter of one block. If you don't need audio this is seems to 
be the best jitter you can get with control-rate signals in pd.

Audio on or off, 70ms nominal delay, mainly:
29.0249 = 20 * 1.4512
34.8299 = 24 * 1.4512
Here the 4-block jitter is happening.

Setting the key repeat rate slider all the way to to Slow alternates 
between 412.154 and 406.349, again a jitter of  exactly 4 blocks.

This is the same jitter that happens with metro and comport. In pd all 
'control rate' signals are quantized to the 64-sample block, but what 
causes the 4-block jitter?

Martin

> Ciao
>   
> ------------------------------------------------------------------------
>
> #N canvas 0 0 450 300 10;
> #X obj 124 117 keyname;
> #X obj 124 144 t b b;
> #X obj 124 172 timer;
> #X obj 124 196 print;
> #X connect 0 0 1 0;
> #X connect 1 0 2 0;
> #X connect 1 1 2 1;
> #X connect 2 0 3 0;
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>   





More information about the Pd-list mailing list