Forums > MaxMSP

Detecting multiple bangs within set duration?

October 10, 2013 | 5:33 pm

Hi,

First post, new to Max. Running Max 6.1.3.

I need to outbang when bangs from two other objects happen within a certain amount of time (1000ms) from each other.

In other words, I have two functions that outbang when certain things happen. I need to outbang when both of those things happen, within 1000ms of each other.

Thanks a ton! Much appreciated.


October 10, 2013 | 6:10 pm

this should do what you want

<code>

– Pasted Max Patch, click to expand. –

</code>


October 10, 2013 | 6:16 pm

Calculate the difference between the time of occurrence of the two bangs. If it’s less than or equal to 1000 ms, then bang.

<code>

– Pasted Max Patch, click to expand. –

</code>


October 10, 2013 | 6:32 pm

Wait, I am confused! How do I open these posted max patches? I’ve copied the code, selected ‘new from clipboard,’ and opens a coll looking thing opens with the copied text inside. How do I open this up as a patcher in max 6?

Thanks!


October 10, 2013 | 7:02 pm

Did you include the first and last lines?

– Pasted Max Patch, click to expand. –

Or better yet, just click on the little icon to the right, and it will copy the right stuff to the clipboard for you.


October 10, 2013 | 7:49 pm

Thanks Christopher! That was silly of me. Thanks, both of these solutions work great.


Viewing 6 posts - 1 through 6 (of 6 total)