looping issue


    May 01 2006 | 6:23 pm
    trying to make a simple patch that will add one each time a loop finishes, but cant get passed the first hurdle.
    here i hjave simulated the output of a groove~ oobject with a phasor~
    in theory, it should bang each time it reaches 0.99, which is accurate enough for my purpose, but it doesnt work at all!!!
    can anyone help?

    • May 01 2006 | 7:18 pm
      hi john,
      i cant open your patch at the moment i dont have max
      on this machine but i think the '>=' object and
      'change' object should do the job for you.
      hope it helps
      j.
    • May 01 2006 | 7:31 pm
      May be this?
      max v2;
    • May 01 2006 | 7:34 pm
      Your [select] expects precisely 0.99, but I don't think we can guarantee
      that -- you have [snapshot~] in self-clocking, so we don't know exactly
      where it's going to land.
      max v2;
    • May 01 2006 | 7:40 pm
      thanks guys, this object worked
      #P window setfont "Sans Serif" 9.;
      #P window linecount 1;
      #P newex 437 289 113 196617 if $f1 > 0.99 then bang;
      #P window clipboard copytext "if $f1 > 0.99 then bang" #E;
      #P window clipboard copycount
      what i need now is a way to count the bangs up, i think there is an object for this?!?!?
    • May 01 2006 | 7:44 pm
      i got this, but it jumps up each time, rather than simply adding one
    • May 01 2006 | 7:58 pm
      You forgot arguments for your [counter].
      (check the help -- it's pretty straighforward)
      --raf.
    • May 01 2006 | 8:00 pm
      On 1 May 2006, at 20:40, John wrote:
      >
      > what i need now is a way to count the bangs up, i think there is an
      > object for this?!?!?
      counter ???
      david
    • May 01 2006 | 8:07 pm
    • May 01 2006 | 8:10 pm
      i dont think i need arguements, i think the fault is in the if statement outputtinng too many bangs
    • May 01 2006 | 8:12 pm
      On May 1, 2006, at 3:40 PM, John wrote:
      > what i need now is a way to count the bangs up, i think there is an
      > object for this?!?!?
      [counter]
      -----
      Nathan Wolek
      nw@nathanwolek.com
    • May 01 2006 | 8:18 pm
      now this is what i have.
      i want to round up the results to the nearest 0.01
      any ideas?
    • May 01 2006 | 9:12 pm
      Hmmmn, shouldn't trust a fellow noob, I reckon :-)
      (which I am, again -- after a *very* long layoff)
      I hope things are going well for you now!
      --raf.
      John wrote:
      > i dont think i need arguements, i think the fault is in the if statement outputtinng too many bangs
    • May 01 2006 | 9:42 pm
      Least objects, maximum accuracy
      best, Thijs
    • May 02 2006 | 7:45 pm
      May I offer this to characterize your version: "Make no assumptions."
      (John -- note that Thijs's patch has no constants, like 0.99, to
      arbitrarily define the "top of ramp")
      --raf.
      Thijs Koerselman wrote:
      > Least objects, maximum accuracy
    • May 02 2006 | 8:51 pm
      true true. I sounded a little too confident there... but it's just the best
      way damnit ;-)
      cheers, thijs
    • May 03 2006 | 1:17 am
      Thanks Thijs,
      For ages i've been using: phasor~ + delta~ + >=~ 0. + edge~ and your method is miles better at catching the transitions when phasor~ is running at high rates.
      cheers,
      john
    • May 03 2006 | 5:17 am
      John wrote:
      > in theory, it should bang each time it reaches 0.99, which is
      > accurate enough for my purpose, but it doesnt work at all!!!
      >
      > can anyone help?
      I recommend to do this kind of stuff with edge~,
      snapshot is bad and eats all your scheduler cycles which you might need
      elsewhere...
      --
      [][] [][][] [][] [][][]
      [][][][][][][][][][][][][][][]
      Stefan Tiedje
      Klanggestalter
      Electronic Composition
      &
      Improvisation
      /~~~~~
      \ /|() ()|
      ))))) )| | |( \
      /// _/)/ )))))
      ___/ ///
      -------------------------x----
      --_____-----------|-----------
      --(_|_ ----|-----|-----()----
      -- _|_)----|-----()-----------
      ----------()------------x-----
      14, Av. Pr. Franklin Roosevelt,
      94320 Thiais, France
      Phone at CCMIX +33-1-57 42 91 09
    • May 03 2006 | 12:11 pm
      why does 0.5 work when i need it to wait until 1?
    • May 03 2006 | 1:04 pm
      edge~ left outlet will bang when there is a transition from 0. to above 0.
    • May 03 2006 | 1:29 pm
      so what does the arg 0.5 actually mean?
    • May 03 2006 | 4:50 pm
      not sure what you mean, maybe this helps ?