Forums > MaxMSP

Bug with [select]?

February 11, 2014 | 12:51 pm

Hey All,

I noticed this when I was teaching a class and think I found a bug with [select]. If I send the numbers that match [select]‘s arguments, all is good and it behaves as it should, by sending out a bang. If I put in a number that doesn’t match the arguments, it only "bangs" if it’s hooked up to a bang. The sample patch I included has it hooked up to a random to demonstrate this. Confused the heck out of me and my students :)

<code>

– Pasted Max Patch, click to expand. –

</code>


February 11, 2014 | 1:06 pm

That is the expected behavior. If the incoming value matches the argument, [select] outputs a bang from the left outlet. If the incoming number does not match, it simply passes that number out the right outlet without sending a bang through either outlet. If you need a bang when the incoming number doesn’t match, add a trigger object with a b for the argument [t b] and connect it to the right outlet of [select]. Then whenever a value comes out of the right outlet, it will be converted into an actual bang message.


February 11, 2014 | 1:08 pm

Ah makes sense. I overlooked that. Thanks!


February 11, 2014 | 1:27 pm

ok, you see:

<code>

– Pasted Max Patch, click to expand. –

</code>

;-)


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