I am going to kick myself, but...

    Nov 30 2011 | 6:39 pm
    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

    • Nov 30 2011 | 7:02 pm
      Try this mate,
      I'm sure there must be a more elegant way of doing this but it's a start
    • Nov 30 2011 | 7:39 pm
      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
    • Nov 30 2011 | 8:07 pm
      i used f0.inc_dec_split - detect direction of incoming values and split to different outlets http://www.fredrikolofsson.com/pages/code-max.html
    • Nov 30 2011 | 8:08 pm
      From the change help file:
    • Nov 30 2011 | 8:09 pm
    • Nov 30 2011 | 8:41 pm
      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
    • Dec 01 2011 | 6:22 am
      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!
    • Dec 01 2011 | 6:44 am
      if $i1 > $i2 then 1 else -1
      with the input fed into both inlets of if.
    • Dec 01 2011 | 6:31 pm
      nice one roman
    • Dec 01 2011 | 8:27 pm
      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
    • Dec 01 2011 | 9:14 pm
      This patch collects and measures the timing of the 100% Max distributions mentioned so far.
    • Dec 01 2011 | 9:14 pm
      yes, the if thing would then look like that.
    • Dec 01 2011 | 9:29 pm
      nice comparison, chris.
    • Dec 01 2011 | 9:40 pm
      :) mine's smaller
    • Dec 01 2011 | 9:53 pm
      "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