Help with conditions
Hi guys,
I need some simply help a conditions I want to make in Max.
I've set up an analyser of peaks higher than a certain threshold. Every time there's a peak higher than the threshold it sends a bang. So far, so good. Now, because I wanted maximum least latency, I've set up my peakamp to measure at every millisecond and thus when it sends the bang it sends multiple bangs very quickly. How to make the following condition: if bang, don't bang for at least 50 milliseconds?
"if bang, don’t bang for at least 50"
control a gate, which can disallow banging, with pipe or delay:
[t 1 0 ]| |[pipe 50.] || |[gate] (both in control inlet)
Thanks! This works smoothly.
Sorry to bother again, just to make sure I understand how it works - what happens is that it first hits the 1 and passes the gate and then it hits the zero > the gate closes. Because there's a delay on the 1 it can't hit it again, therefore the gate stays closed until the 50 milliseconds pass.
Does this mean that if it bangs faster than 50 milliseconds it wouldn't register it?
it first hits the 0 ("if bang, dont bang") then the 1. but i just see that it not really working like this. if you raise the dela time to 500 you will see that it is imperfect. :)
the pipe must be cleaned before any trigger is recieved. dont know offhand how i would solve it, but i am coming back on it.
Hi,
Maybe this is what you need?
`