[PD] tabwrite bug?

Frank Barknecht fbar at footils.org
Sun May 21 11:25:53 CEST 2006


Hallo,
Nicola Bernardini hat gesagt: // Nicola Bernardini wrote:

> I have noticed something that seems like a bug to me: if you write on an
> array via a tabwrite attached to a cursor that writes both x and y  data
> (basically doing a diagonal line), your table will be interspersed  with
> zeros depending on the speed to  which  you  move  the  slider.

If it is a bug, then it would be one of the slider, not of tabwrite.
If you print the numbers sent by a slider on fast movement, you will
see that it not "hits" all numbers, but instead jumps over some values
depending on how fast you move.

Here's a [print HSL] attached to a slider. First I'm moving slowly,
then at about 10 I speed up: 

HSL: 0
HSL: 1
HSL: 2
HSL: 3
HSL: 4
HSL: 5
HSL: 6
HSL: 7
HSL: 8
HSL: 9
HSL: 10
HSL: 11
HSL: 13
HSL: 15
HSL: 25
HSL: 35
HSL: 49
HSL: 59
HSL: 71
HSL: 83
HSL: 95
HSL: 109
HSL: 121
HSL: 127

All the "holes" in the list of numbers will show up as zeros in your
tabwrite construct. Numberboxes behave the same, btw.

However: I don't consider this a bug but a feature! At least I quite
often rely on that behaviour for easily getting at the speed of change
in a slider instead of just the values. The idiom I use for this is
simple: 

     _____________
    [_____|_______] <= slider
    |
    [t f f]
     \ /
      X
     / \
     [- ]
     |
     [print SPEED_OF_SLIDER_MOVEMENT]


This is very useful sometimes. I know, that the Right Thing to get at
the speed of change is using a [timer] and all that, but often a
cross-substracting slider is more than enough for my purposes.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__




More information about the Pd-list mailing list