Limiting the number of inputs
Newbie here: I am trying to limit the number of inputs from a spring mounted sensor. The bouncy nature of the spring causes multiple pulses to be sent. How can we get MAX to take the first pulse, ignoring all other pulses, and hold the output from that first pulse for 2 seconds before taking the next pulse, ignoring all latter pulses and hold the output for 2 seconds?
I have a similar problem i would like to solve. I would like that a audio signal from a adc~ will trigger a record~ object to record the same signal. but after the first trigger it should be ignored for the recording time of the buffer. did you find a solution?
i just need an object which puts out a "bang" or "1" once, and doesn’t repeat it if the same trigger comes in again.
thanks for any help
"How can we get MAX to take the first pulse, ignoring all other pulses, and hold the output from that first pulse for 2 seconds before taking the next pulse, ignoring all latter pulses and hold the output for 2 seconds?"
You could use the first pulse to trigger the closing of a gate object (inbetween the output of pulses and whatever they are triggering) and to also trigger a [delay 2000.] object which would then reopen the gate.
I’m new to max as well, but I don’t know of an object that will only bang once even when receiving multiple bangs (there may be one). Gating will sort it out though.
hey thanks for the reply…
i was working with "incdec" and "sel" objects now and finally found a way.
incdec is taking each single input and adds it trough a "inc" message. On the output i put a sel object which selects number one and puts out a bang. with a delay i have a 0 coming in as you suggested as well. this will stop the record. works perfect.
i was trying several ways with the gate but it didn’t work for me…
but this way it works…
(gonna check out onebang now)
My bad, no need there at all for a gate. Heres an even easier way though. Although I’m not sure you need any of this if you just want record~ to stop when the buffer is full. It will automatically stop recording when the buffer length is reached.
(copy text below and choose file > new from clipboard in case you’ve not done this before)
----------begin_max5_patcher---------- 1893.3oc0btzaiaCDG+bxmBAervMKmgjRT8PAVfde6odonnPwhNQsxRA1x6S r6m8JwgNQIarHU0CqMGbrjcj+qeb37hz4KWe0paK+n9vpfeI3OCt5pub8UWY NUyItxd7Uq1k7wM4IGLusUaJ2sSWTsZM8ZU5OVYN+GtuLWGTUVnCxK+fd+o2 vC60Gpe+IUYkE+8d8lJ5CCv3naXqC3grlec5gf+x9mUbbW4wpbck4Skc5hkT s49rh6ZcgjrXy0Qxa9Urp4Qr8UJK0nuxa+meNBOopskEUEI6zlW5s6yRxa+J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bd0jzWeA8vkp8edLBZmohTsqli lEB1yQUqZ4RZygDwe7ngpVgui2vBa7FGx3MWBi03M5URHv75A1KBNjh5qO3q W+e.EemUN -----------end_max5_patcher-----------
the problem was that it will get to the end. cause if the record~ gets a "1" input again before the buffer is full the recording will start from the beginning and it will just end recording when no input is coming anymore so the recording will be silent.
(your advice with the clipboard was good … but from there it was still text and i couldn’t make it a patch… newbie as well)
Forums > MaxMSP