keep spaces in combine

clankill3r's icon

How can i keep spaces with a combine object?

3092.Schermafbeelding20111216om00.55.38.png
png
Andrew Pask's icon

You could combine the things you want combined, then join them with the things you want spaces with

-A

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

thanks.
Is there a easy way to create a list?
Cause what i have now seems to be not very suitable for that.

Peter Castine's icon

Or use sprintf.

woodslanding's icon

to create a list, you need PACK!`

Basvlk's icon

I've spent a lot of time trying to do the same there's no good tool that allows combinations of with- and without-space joining that also allows any inlet to be the trigger. here's what I found:

*combine - good for joining without spaces, but not great for joining with spaces. Allows any input to be a trigger BUT its performance is a little slow and as soon as any of the inputs is a symbol, the whole output is a symbol which can make the result useless in some cases
* sprintf - allows joining with and without spaces but is only triggered by its first inlet. more efficient than combine, but less efficient than join or pack
* join - very efficient, allows any inlet to be the trigger but you can't join without spaces
* pack - very efficient, but you can't join without spaces and only the first inlet can be the trigger
* prepend / append: can be very useful if you only need to join 2 elements, quite efficient
* don't forget you can also use a message box which is not at all ineffecient (which is what I believed initially, as it is a UI object') - though join is faster than a message box

I do my efficiency comparisons using the pedant patcher which you can find in the toolbox

hope some of that is useful!

Chris Muir's icon

In general I've found sprintf to be the best general purpose tool for this sort of thing. Once you are comfortable with format strings you can make it do most things like this. The only fires with the left inlet is not much of a problem, at least for the stuff I do.