Forums > MaxMSP

keep spaces in combine

December 15, 2011 | 11:52 pm

How can i keep spaces with a combine object?


  1. Schermafbeelding20111216om00.55.38.png


December 16, 2011 | 12:12 am

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


December 16, 2011 | 12:34 pm

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

— Pasted Max Patch, click to expand. —
December 18, 2011 | 5:37 pm

Or use sprintf.

December 19, 2011 | 8:47 pm

to create a list, you need PACK!`

December 20, 2011 | 1:54 am

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!

December 20, 2011 | 2:22 am

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.

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

Forums > MaxMSP