Forums > MaxMSP

Storing a message for play~ in coll

December 13, 2012 | 9:32 am

I’m trying to store some messages in a coll-object, they are meant for a play object and have this form: 0, 1000 1000. If i’m correct, i can store this on index 1 of coll by prepending it with that index: 1 0, 1000 1000. If i send this to coll, it gives me an error about the syntax. What should i do here?

A somewhat related question: how fast is a function in a js-object instead of the coll? I’d rather code storing/sending of messages myself, but i’m not sure if i should do that with js.


December 13, 2012 | 9:52 am

Hmm, i seem to have mistaken the messages that are meant for line~ instead of play~. And by looking at this link http://music.arts.uci.edu/dobrian/IAP2012/examples.htm#Ex17 it seems i can use the message ‘start 0 1000 1000′ directly into the play object without the use of line~. How come i don’t see that start message explained in the play~ reference? (http://www.cycling74.com/docs/max5/refpages/msp-ref/play~.html)

Still, i’m curious to know how to store a message like ’0, 1000 1000′ in a coll.


December 13, 2012 | 7:05 pm

The comma is the problem.. The good news is that you don’t need it for line~. In a message box, the comma is treated as shorthand for "split this into two messages," resulting in a message of "0" followed by a message of "1000 1000" If you instead send line "0 0 1000 1000" it has the same effect as sending the two messages above.


December 13, 2012 | 8:30 pm

Thanks for that info, i didn’t know that.

And what about my other question: can i use javascript to construct those messages (on an incoming bang for example), or will that be too slow and mess up the timing.


December 13, 2012 | 9:13 pm

I tend to stay away from javascript in Max. Perhaps if you posted a patch showing what you are trying to accomplish, a solution could be offered.


December 13, 2012 | 9:29 pm

I can’t imagine not using js in max anymore, you should really consider looking at it (although it ofcourse depends on what you make). It makes it so much easier to set stuff up, initialize, prepare ui elements, switch ui elements, react to user input, create objects/connections on the fly. For things like that, it makes it soooo much cleaner, and easier to maintain/expand.

I could do what i want by placing max objects, but i’d like to yse js as much as possible, so i was wondering how it handled things when timing is essential. The timing-essential stuff i’d like to do with it is not that complicated, but still…. i’ll just give it a try.


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