Bug with [select]?

Feb 11, 2014 at 12:51pm

Bug with [select]?

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>

#280773
Feb 11, 2014 at 1:06pm

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.

#280775
Feb 11, 2014 at 1:08pm

Ah makes sense. I overlooked that. Thanks!

#280776
Feb 11, 2014 at 1:27pm

ok, you see:

<code>

– Pasted Max Patch, click to expand. –

</code>

;-)

#280782

You must be logged in to reply to this topic.