Binding functions to symbol messages to second inlet only?

Jun 21, 2007 at 1:13am

Binding functions to symbol messages to second inlet only?

I want an object with two inlets.

I want the first inlet to be able to accept any message.

I want to bind functions to the second inlet, accepting several specific messages (symbol messagename, symbol argument), and reject any others. Rejected messages should not be passed to the first inlet.

The first inlet should also be able to accept the same specific messages, but pass them through, not executing the bound function.

Given the above, is it possible to avoid testing the inlet number every time a message arrives at an inlet – especially for the first inlet?

What’s the best way to deal with this sort of thing?

#32561
Jun 21, 2007 at 9:02am

Let me ask you a question: why don’t you want to test? If you have to
use the words “clean” or “efficient” or “optimize” in your answer,
you are likely spending your time chasing a spectre.

Your bottleneck, if it exists, is not, and will never be, an if or
switch testing the origin of messages as they arrive.

jb

Am 21.06.2007 um 03:13 schrieb John Pitcairn:

> Given the above, is it possible to avoid testing the inlet number
> every time a message arrives at an inlet – especially for the first
> inlet?

#107429
Jun 21, 2007 at 8:48pm

Yeah, fair enough. I was just interested to know if there was an alternate way to do this sort of thing. The docs imply that there isn’t, but that may just be my mis-reading.

#107430

You must be logged in to reply to this topic.