Detecting multiple bangs within set duration?

Oct 10, 2013 at 5:33pm

Detecting multiple bangs within set duration?

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.

#267721
Oct 10, 2013 at 6:10pm

this should do what you want

<code>

– Pasted Max Patch, click to expand. –

</code>

#267723
Oct 10, 2013 at 6:16pm

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>

#267724
Oct 10, 2013 at 6:32pm

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!

#267725
Oct 10, 2013 at 7:02pm

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.

#267726
Oct 10, 2013 at 7:49pm

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

#267727

You must be logged in to reply to this topic.