Conditional Statements


    Feb 25 2006 | 12:55 am
    I've been having some problems with conditional statements. From a single number input, i need to trigger a bang in a specific range (eg 40-50). All attempts with varying uses of && and || have been spitting out errors.
    I've tried searching around here and elsewhere on the 'net but can't actually find anything relating to two conditions on a single number.
    Any help would really be appreciated.

    • Feb 25 2006 | 1:06 am
      here is a simple way with a split object
      //yac
      ______________________________________
      max v2;
    • Feb 25 2006 | 2:23 am
      Thank you very much. That worked like a charm.
    • Feb 25 2006 | 2:54 am
      Here's an abstraction called PM.Zones that will classify an input
      stream into various zones. Different way of solving the problem. This
      might be handy, because it's open-ended. (whereas split is binary in
      its decision) Input a list with the boundaries in the right. (e.g.
      10 20 80 90 107) It'll output which the zone that the input is in out
      the left.
      Peter McCulloch
      max v2;
    • Feb 25 2006 | 1:32 pm
    • Feb 25 2006 | 4:14 pm
      On around Feb 25, 2006, at 14:32, Falk Grieffenhagen said something
      like:
      >
      You want && (double ampersand).
      Single ampersand is doing something different. It will work in this
      case but it is not doing what you think it is doing (unless you're
      being more clever than is appropriate for a read-the-friendly-tutorials
      question).
      -- Peter
      -------------- http://www.bek.no/~pcastine/Litter/ --------------
      Peter Castine | ^
      | Litter Power & Litter Bundle for Jitter
      pcastine@gmx.net |
      pcastine@bek.no | iCE: Sequencing, Recording, and Interface Building
      4-15@kagi.com | for Max/MSP
      | Extremely cool
      | http://www.dspaudio.com
      | http://www.dspaudio.com/software/software.html