[PD] how to detect if array has changed

Jack jack at rybn.org
Tue Dec 28 14:42:00 CET 2010


Le mardi 28 décembre 2010 à 13:25 +0100, João Pais a écrit :
> what do you mean with data structures, didn't see any in your patch.
It was a suggestion. My patch only show one possibility to achieve what
Ico was looking for, without data structure.
The use of data structure (array) is another possibility (not so
elegant, as i wrote before, the click on data structure is not enough,
you still need a metro or a mouse listener. However, it is most elegant
graphically ! ;).
++

Jack


> 
> to the original poster, if it's a control array, it should change when you
> tell it to. so, jack's first suggestion is the most efficient, before you
> do a change, see if the written indexes are really different. otherwise
> there is the hard solution, but that implies you have a constant data flow
> going on at the same time, it's not the most efficient solution.
> 
> 
> > Look at the patch attached to this mail.
> > I think array in data structures is a most elegant way to do what you
> > are looking for.
> > ++
> >
> 
> 
> >> Thanks all for the reply. Forgot to mention critical part--all this
> >> detection should however happen when one is "drawing" the array by
> >> clicking with the mouse onto the array's points and dragging them to new
> >> positions. Hence, there is no "middleware" patch to speak of (other than
> >> what array inherently provides). Is there anything that may provide
> >> this?
> 
> if that's what you want to do, then there will always be changes. it's not
> possible to have the hand precision.
> unless you use an array that has a vertical step limit. since that's not a
> feature from array, I did once a data structures abstraction to do it. but
> I can't find it now.
> or, if using data strucutres, you can use the click output to know when
> change is being made, and compare it with an older state. that makes it
> more efficient, the comparison patch doesn't have to be working at an x
> rate.
> actually, that abstraction I did would do the job, then. it's somewhere in  
> my disk, was part of a bigger patch.





More information about the Pd-list mailing list