Forums > MaxMSP

comma in a message …

December 7, 2011 | 7:41 am

Hi forum,

Please see the question in the below patch:

– Pasted Max Patch, click to expand. –

December 7, 2011 | 7:55 am

Do you want a comma there so that the the first zero will be treated as a separate message when it’s sent out? It would maybe be best to clarify that. It might be better to use $1, $2, $3 etc. in a message box rather than a prepend object.

– Pasted Max Patch, click to expand. –

December 7, 2011 | 8:05 am

Hi,

Yes, let me clarify it a bit … I need to feed the message to a line~ object, so I need a 0, in the beginning and the rest of the fading values to be variables.

K


December 7, 2011 | 8:25 am

You can use the sprintf object like this:

"sprintf 0., %i %i %f"

%i is for int and %f for float. Each % argument creates a separate input, like pack or pak.


December 7, 2011 | 8:28 am

Yeah, what I posted should work fine. That’s the usual way to feed things variably to a line object.

– Pasted Max Patch, click to expand. –

EDIT: Thanks Pedro! That was something I didn’t know, will come in handy


December 7, 2011 | 9:05 am

Thanks :-)

I also found this:

– Pasted Max Patch, click to expand. –

December 7, 2011 | 9:54 am

Since a comma in a message box effectively turns its content into two separate messages that are sent in succession, we could also send the two messages separately like this:

– Pasted Max Patch, click to expand. –

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