Sending "bang" through a spray?

Jul 11, 2009 at 3:45pm

Sending "bang" through a spray?

I have a bunch of number boxes attached to a spray object, and want to be able to send a “bang” to a specific one.

I was doing this before by sending the outlet number, appending a 1, and then inserting a button between the spray and the number.

However, I am using the spray to send different messages now, so would rather send a “bang” directly.

– Pasted Max Patch, click to expand. –
#44699
Jul 11, 2009 at 3:54pm

Here a few suggestions.

_
johan

– Pasted Max Patch, click to expand. –
#160859
Jul 11, 2009 at 4:03pm

That’s very helpful! The pvar technique is highly intriguing. For now I will use the “route” technique.

Any reason why “spray” can’t pass through a bang? It seems to pass other message types fine…

#160860
Jul 11, 2009 at 5:37pm

The [spray] object only accepts lists (which in max means lists of numbers). Look at the reference page to see details of what you can send to the object. As Johan said: [route] is definitely the way to go.

lh

#160861
Jul 11, 2009 at 6:25pm

Well, I did look at the documentation, and there is a mode where “spray” passes lists through. It passes all kinds of other messages without problems – only bang seems to act weird.

See this for example, the bgcolor message gets through fine, but bang is ignored.

– Pasted Max Patch, click to expand. –
#160862
Jul 12, 2009 at 12:07pm

You’re correct, I wasn’t testing [spray] in list mode. It seems that it only passes messages with arguments so “0 bang” won’t work but “0 hello 3″ and “1 a b c” will work.

lh

#160863

You must be logged in to reply to this topic.