Eliminating double triggering

    Jan 31 2010 | 12:25 pm
    Hi - I'm new to Max MSP and am trying to find the best way to do the following: I have a midi device that is sending midi into the computer, and occasionally it double-triggers. Is there a way to set up hysteresis or use some other method so that there is a short time threshold that applies to stop repeated notes from triggering - in other words, I'd like the system to play the first midi note it receives, and then ignore the same note for say, 50 milliseconds for example. I suspect this might have something to do with the speedlim command or something - otherwise is there a plug in or a pre-existing max app that I can use that will stop this doubletriggering? Thanks very much for your help!

    • Jan 31 2010 | 12:39 pm
    • Jan 31 2010 | 1:22 pm
      Thanks pid - can you be more specific? I've also just noticed the sensor-tamer. Is this a better way to go?
    • Jan 31 2010 | 2:42 pm
      just load thresh and quickthresh into a patcher and look at the help and ref files - it is all very simple and they explain better than i could. sensor tamer is an abstraction that would interesting look inside of, sure. but what you need to do is very achievable with the aforementioned objects.
    • Jan 31 2010 | 3:20 pm
      I tend to use this (there may be a better way) - I believe this is quicker than thresh, because the bang you want goes straight through with no delay.
      If you want to use messages other than bangs in, put a [t b] in front of the delay to transform any message into a bang..
    • Jan 31 2010 | 3:23 pm
      Or - if you look at the sensor tamer abstraction - you only need the debouncer subpatch. This does the same thing with one less object, but would be slightly harder to adapt to other messages. In fact - it's possible you could do it in just two objects (the onebang and the del(ay)...
    • Jan 31 2010 | 4:44 pm
      A simpler solution using onebang:
    • Feb 01 2010 | 10:38 am
      Wouldn't it be an idea to use [speedlim] here, in order to make sure you always have the correct last value sent through, even when the midi signal 'bursts'?
    • Feb 01 2010 | 5:50 pm
      in the triggering i have in my patch, i have a delay you can set before another trigger is possible. it is just done with a gate, where triggers can only pass through the gate to be received when the gate is open. when the first trigger is sent, it passes through the gate and immediately closes it. you then have a delay which you can adjust the time of, after that time has elapsed a bang is sent to open the gate again, at which point a second trigger can pass through. this may not be the most straightforward way to do it, but it works fine if all you want to do is say prevent 2 triggers within 50ms (or any other value).