comma in a message ...

Kaspar's icon

Hi forum,

Max Patch
Copy patch and select New From Clipboard in Max.

Please see the question in the below patch:

commathe's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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.

Kaspar's icon

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

Pedro Santos's icon

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.

commathe's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

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

Kaspar's icon

Thanks :-)

Max Patch
Copy patch and select New From Clipboard in Max.

I also found this:

Pedro Santos's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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: