[PD] tabwrite bug?

thewade pdman at aproximation.org
Sun May 21 06:18:08 CEST 2006


Quoting Mathieu Bouchard <matju at artengine.ca>:

> On Sat, 20 May 2006, thewade wrote:
>
>> I think the problem is not gui refresh rate, provided I understand the
>> situation corectly. Objects without the tilde (~) in them work at a
>> slower rate then the signal rate objects - the tilde objects.
>
> That's not the problem either. There are two problems: first, the refresh
> rate of the mouse is not fine enough to have the mouse really visit
> contiguous pixels; second, the gui refresh rate slows down Tcl/Tk, such
> that Tcl/Tk may get several mouse events in a burst if one screen refresh
> takes too long, and I suppose that Tcl/Tk keeps only the most recent one.

Yes, that is what I thought at first too, but then I built a patch to 
see if I was right. I know that a 100 pixel wide slider with a value 
range of 0-200 will only return values for 0, 2, 4, 6, 8, etc. but 
using line should fix that simple problem, shoudn't it? But it doesnt. 
(see attached patch if you want.)
I even tried using a [metro 1] attached to a [snapshot~] and used 
[line~] but that was silly because that is actually slower then just 
using [line].

As I understand it [line] is not a tcl/tk object but a PD object and it 
should do the interpolation that the hslider doesn't, except [line] 
works at samplerate/blocksize rate and so information gets skipped.

I haven't actually looked at the PD code so I might be talking out of 
my arse, but I have hooked a [line] (not [line~]) object up to a 
signalrate object as an envelope and heard the popping, and I have 
worked with Csound that also has control rate and sample rate 'objects'.

-thewade

-------------- next part --------------
#N canvas 633 91 583 506 12;
#N canvas 0 0 450 300 graph1 0;
#X array array1 200 float 0;
#X coords 0 200 199 0 200 140 1;
#X restore 100 20 graph;
#X obj 112 291 line;
#X obj 112 320 int;
#X obj 113 350 t f f;
#X obj 116 240 hsl 100 15 0 200 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 6300 1;
#N canvas 0 0 454 304 reset 0;
#X obj 200 25 inlet;
#X obj 176 265 tabwrite array1;
#X msg 177 235 0;
#X obj 198 121 int;
#X obj 199 145 + 1;
#X obj 198 172 sel 200;
#X msg 198 95 -1;
#X obj 205 63 t b;
#X obj 229 203 t f b f;
#X connect 0 0 7 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 1 8 0;
#X connect 6 0 3 0;
#X connect 7 0 6 0;
#X connect 8 0 3 0;
#X connect 8 1 2 0;
#X connect 8 2 1 1;
#X restore 390 79 pd reset;
#X obj 382 55 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 112 263 \$1 100;
#X obj 113 399 tabwrite array1;
#X text 78 188 should work but doesn't because its at the control rate
;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 8 0;
#X connect 3 1 8 1;
#X connect 4 0 7 0;
#X connect 6 0 5 0;
#X connect 7 0 1 0;


More information about the Pd-list mailing list