comma in a message …

Dec 7, 2011 at 7:41am

comma in a message …

Hi forum,

Please see the question in the below patch:

– Pasted Max Patch, click to expand. –
#60531
Dec 7, 2011 at 7:55am

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. –
#217864
Dec 7, 2011 at 8:05am

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

#217865
Dec 7, 2011 at 8:25am

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.

#217866
Dec 7, 2011 at 8:28am

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

#217867
Dec 7, 2011 at 9:05am

Thanks :-)

I also found this:

– Pasted Max Patch, click to expand. –
#217868
Dec 7, 2011 at 9:54am

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

You must be logged in to reply to this topic.