One switch on = on, All switches off = off

Apr 15, 2012 at 6:03am

One switch on = on, All switches off = off

Hi everybody, I’m an idiot.

I have six switches(on outputs a 1, off outputs a 0)that I need to use to control one action. I need to make an audio clip play when one or more of the switches are triggered, and remain playing until all of them are turned off.

I’ve been searching for a solution for hours and am totally lost. I’ve been away from max for a while now and unfortunately don’t have time to go through the tutorials again before finishing this assignment.

Any help would be immensely appreciated.

#62979
Apr 15, 2012 at 8:22am

Here are two possible ways of doing it.

best! Edwin

– Pasted Max Patch, click to expand. –
#227288
Apr 15, 2012 at 8:36am

One more:

– Pasted Max Patch, click to expand. –
#227289
Apr 15, 2012 at 8:57am

And maybe:

– Pasted Max Patch, click to expand. –
#227290
Apr 15, 2012 at 9:03am

(The same patch, but for Max 5)

– Pasted Max Patch, click to expand. –
#227291
Apr 15, 2012 at 9:06am

You guys are clever! I did manage to figure out a system that works, but in many ways, your solutions are more elegant. Here’s what I came up with, in case anyone is curious:

Many thanks!

– Pasted Max Patch, click to expand. –
#227292
Apr 15, 2012 at 9:21am

Hi Nolocus, you might need to change your [pack] to [pak]….but your method made me think of yet another way :-)

– Pasted Max Patch, click to expand. –
#227293
Apr 15, 2012 at 9:36am

@Nolocus, good that things work!

@Jeff, the last one is very nice. I was thinking that depending on the nature of the input data it might be needed to feed each of the inputs through a change object first so that accum doesn’t get out of control ;-)

#227294
Apr 15, 2012 at 9:40am

Hi Edwin, too true! :-)

#227295
Apr 15, 2012 at 11:15am

Hi !
Maybe this is of interest too ;)

– Pasted Max Patch, click to expand. –

`

#227296
Apr 15, 2012 at 3:17pm

Jeff: yours is my favorite one, but I’m fairly certain that once you use presets on that accum patch, it will start giving you incorrect results.

last year i made a mute/solo patch for a drum machine i made and had an awful time making it finally work right with presets.

not trying to get smart or anything, its just that i usually make sure my patches work, and then work with presets or else they’re useless to me.

#227297
Apr 15, 2012 at 3:46pm

Hi Ameqc,

You are totally correct. That’s why Edwin’s suggestion was spot on…here it is functioning with preset by adding the [change] objects after the toggles.

– Pasted Max Patch, click to expand. –
#227298

You must be logged in to reply to this topic.