I am going to kick myself, but...
What objects should I use to monitor/observe/process an int so that if the number increases it will output a 1 and if the number decreases it will output a -1?
Maybe it's too many hours on this project, but I cant seem to get this...
Thanks in advance for any help,
-Hank Witecki
Try this mate,
I'm sure there must be a more elegant way of doing this but it's a start
Benny
hello henk,
here is my ftm solution … you will need to download ircam´s ftm lib,
other wise the patch will not work.
you can download ftm here:
http://ftm.ircam.fr/index.php/Main_Page
greetings,
johannes
i used f0.inc_dec_split - detect direction of incoming values and split to different outlets
http://www.fredrikolofsson.com/pages/code-max.html
From the change help file:
Chris's way is far better than mine I'd say. The first thing I looked at was in fact the change object but I completely missed the bit at the bottom of the helpfile.... hidden in plain sight! Ha
Thank you all so much,
It makes an artist so happy to come home at the end of a long day to see a brilliant community of helpful people with so many unique solutions to a problem.
I ended up using Benny's example, as it was the most precise, but you all have provided great examples, and at the risk of repeating myself I just cant thank you enough!
-Hank
if $i1 > $i2 then 1 else -1
with the input fed into both inlets of if.
nice one roman
if $i1 > $i2 then 1 else -1
the two numbers are always going to be the same... that wouldnt output anything... you could do a zl.queue or something to store the previous number and then compare them in the if... but this works PERFECTLY vvvvv
This patch collects and measures the timing of the 100% Max distributions mentioned so far.
yes, the if thing would then look like that.
nice comparison, chris.
:) mine's smaller
"on a serious note"
dealing with repeating numbers
benny: will pass -1
change: will pass nothing (naturally)
yair: will pass 0
roman/johannas: pass -1
f0.inc_dec_split: pass 1
as always, removing updating screen elements shaves a few cycles.
thanks chris for the benchmark patch