Acknowledging a sudden increase
This is a difficult to explain but basically I have a numerical output which is always changing. However, I dont want to acknowledge the small changes in numbers, but only when the numbers increase quickly and a large increase of numbers.
If anyone has any ideas if this is possible, id appreciate the time,
it really depends on if we are talking about consecutive numbers, about a certain time period, or about a tendency, the latter which would require that the user may (and have to) set the time and difference values arbitrarily.
for consecutive numbers, something like [if abs($f1-$f2)>=50 then 1 else 0], where $f2 is the last value, will be all you need.
if time is involved, [timer], and probably [accum] and [mean] should be created in your patch now as a precaution. ;)
I don’t really know which of those options my situation fits into sorry.
If this helps, the numbers are the y corridents produced by blob tracking. So as you can imagine the numbers are constantly changing…
However, what I want to do is create a way of making the patch understand when those numbers rise or fall is over a particular range at a particular speed
I can’t quite get my head round that at the minute. Does it need to be something like, if a change over e.g 10 happens within 50ms then bang? does that make sense?
"Does it need to be something like, if a change over e.g 10 happens within 50ms then bang? does that make sense?"
yes, of course. just calculate a "velocity" value from these time and difference values, then work on that.
here’s a Max solution (as opposed to a Maths solution); using [trigger], [pipe] and [-] to give you velocity. You will need to tweak a few parameters, as Roman states, to get the desired result.
----------begin_max5_patcher---------- 1165.3oc6ZsrjahCEcsSU4efh0NtPO3UVLeBYY1jZpTXP1sRvBWfbmtmTy+9 bkDzF6lts.LXmplMFagdbz4dzQWot+8G+vB20EOwpbc9ry2bVr32PIKzkoJY QSAKb2k7TZdRkthtoE61wDR2k0uTxdRpewir7hTt7YG4CkrpGJxydoN6gBf1 jH4EhuWxRklgj5QW4szgF3qd3U+gye2zrMkaWqpo5MMEUHjU7+goJFgOVt3v NtHmI0XD0t1hjc5Z69UVYVhH4HnRjoOvEaaAHRTrBDjHMfPnP0CLpMlfAp3f rYjdY74Y5wnX8O9Dg5pK7e+3GTOgGKuhja0thBoB1Wlb0DJ0LIteHWbngbIz AQtjIfbyX4IfrkCykaH6Pz7gmlcBwChbvS.4Tx1WTJgE0LmL9lMrRlHk4rlI +EiIb.w2i7hCUNeYoShHy4KuzA4bAKs3fP2K3aFuhCV4eTzE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gRyoQeJPepZ8.Be7ekcS6W. -----------end_max5_patcher-----------
There is a related thread here:
Wow, that is brilliant. Needs a bit of tweaking to fit my patch but that is spot on. Thanks
this forum is brilliant
Forums > MaxMSP