"And" for bangs

    Jul 22 2012 | 8:54 pm
    How can I outlet a bang if and only if 2 other bangs come in at the same time?
    Many thanks in advance

    • Jul 22 2012 | 9:17 pm
      "same time" is undefined.
      Try the onebang object
    • Jul 23 2012 | 1:35 am
      Damn it, Einstein! The music will just never be the same!
    • Jul 24 2012 | 1:21 pm
      Since all event processing is serialized in Max and simultaneity is merely an illusion, "same time" is not only undefined, it doesn't exist!-0
      If you intend "same time" to mean "ultimately triggered by the same event", it would be possible to handle this with a custom external (events have a time stamp indicating the logical, Max-internal time—this is the same value for all events triggered by the same initial trigger). However, it would be easier just to have the initial trigger trigger your "two bangs from different sources happening at the same time" bang.
      If you are thinking more like "two bangs triggered by different source events happening within arbitrarily small epsilon time from each other", you could connect each bang to a [cputimer] object and compare the absolute difference of the result times. You'll need a [t b f] for the right inlet to the subtraction object. Alternately, you could use a non-standard subtraction object with a "hot" right inlet (for instance, lp.delta from Litter Power Pro).
    • Jul 24 2012 | 3:40 pm
      If, by "at the same time", one means "within the same tick of the scheduler", then I think something as simple as this works.