Forums > MaxMSP

Sending "bang" through a spray?

July 11, 2009 | 3:45 pm

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. –

July 11, 2009 | 3:54 pm

Here a few suggestions.

_
johan

– Pasted Max Patch, click to expand. –

July 11, 2009 | 4:03 pm

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…


July 11, 2009 | 5:37 pm

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


July 11, 2009 | 6:25 pm

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. –

July 12, 2009 | 12:07 pm

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


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