keep spaces in combine

Dec 15, 2011 at 11:52pm

keep spaces in combine

How can i keep spaces with a combine object?

[attachment=179497,3092]

Attachments:
  1. Schermafbeelding20111216om00.55.38.png
#60684
Dec 16, 2011 at 12:12am

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

-A

#218427
Dec 16, 2011 at 12:34pm

thanks.
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. –
#218428
Dec 18, 2011 at 5:37pm

Or use sprintf.

#218429
Dec 19, 2011 at 8:47pm

to create a list, you need PACK!`

#218430
Dec 20, 2011 at 1:54am

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!

#218431
Dec 20, 2011 at 2:22am

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.

#218432

You must be logged in to reply to this topic.