Signal-rate order of operations AND/OR Max slop funny business...

    Mar 04 2019 | 5:48 pm
    So I'm working on an updated version of my onset detection patch, and in trying to get more of the patch working in the signal domain, I've run into a problem when I finally want to convert the output of it to the Max domain.
    In an initial version I was using [snapshot~ 1], which works fine, but is super expensive, and is a bit slower than the version I came up with.
    What I want to do is convert from the signal domain to the Max domain whenever a value has changed. Simple enough right?
    So I've gone [sah~] -> [change~] -> [edge~] -> [snapshot~].
    In doing this it acts really weirdly. It works a lot of the time, but sometimes it sends the previous value, sometimes it doesn't do anything at all.
    This led me to think that there's some kind of weird signal-rate order of operations thing happening, so I've tried versions with some small [delay~]s in the mix, but it didn't help. And I've also tried [deferlow] after [edge~] thinking it was a Max slop thing. Also to no avail.
    Any thoughts as to why this isn't working?
    OR is there a better way to go about doing this?

    • Mar 04 2019 | 7:16 pm
      I've got 64/64 for my I/O settings and generally keep overdrive ON, but interrupt OFF.
      Hmm, just tried turning overdrive and interrupt ON and it still doesn't work. In fact, it somehow seems worse?
      What version of Max are you on? Maybe there's something else going on. I'm on 8.0.3 on OSX 10.14.3.
    • Mar 04 2019 | 10:21 pm
      As per a great solution from Alex Harker, here is a working version of the problem.
      "We must take the last sample of the vector to be sure that we have the right one"
    • Jan 29 2020 | 9:16 pm
      I had this issue today. This fixed it. Many thanks for posting a solution! D