[PD] array comparison

William Brent william.brent at gmail.com
Thu Oct 14 03:22:01 CEST 2010


I haven't looked at your patch, but you could do this fairly easily
using [tabletool].  In the case of one table, you can store the
snapshot of old values in a table (called "old-snapshot"), then, if
the new data is in a table called "current-data", do

[subtract old-snapshot(
|
[tabletool current-data]

You'll get the difference between the tables out of [tabletool]'s
right outlet, which you can write to a third table, then use the [abs(
and [sum( functions in [tabletool] to get an indication of how much
change there actually was.  Instead of absolute value, you could also
square everything, sum it, and take the square root.  Either way,
you'll get a single number that indicates how much the current data
differs from the old.


William


2010/10/13 cristiano figueiró <crislists at gmail.com>:
> Hi list,
> I'm with a little problem here:
> In the attached patch, imagine that the arrays are probabilities of
> something (i.e. pitches),
> i would like to automate something that would have the output:
> "array1 is more stable than array2"
> and thinking that the array would be changing it's values in real-time, this
> comparison would be between an old snapshot and actual snapshot of the same
> array.
> I'm in deep trouble? :p
> Thanks for help :)
> Cristiano
>
>
>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
>



-- 
William Brent
www.williambrent.com

“Great minds flock together”
Conflations: conversational idiom for the 21st century

www.conflations.com



More information about the Pd-list mailing list