Forums > MaxMSP

accumulating characters into strings

November 16, 2011 | 9:50 pm

I’m working on a piece where you type text into a text box and it makes a piece.

When it plays back the piece its made I’d like to get it to read the text back into the text box. I’ve got it to do it backwards adding a character to the front of the string and I’ve got it doing it (badly) forwards. Can anyone think of a fool proof way of getting a character to be added like that i.e.:

c then a becomes ca

then an t is added

cat etc.

Hope this makes sense, the characters are called back from a coll object at specific times (this all works reliably).

Thanks in advance.

tim


November 17, 2011 | 1:46 am

this works badly too, but it may help you get on your way

the only problem it has is that you need the first character to come in through ‘init value’ – once that is set all the other ones come through nicely

– Pasted Max Patch, click to expand. –

Can you post your patch?


November 17, 2011 | 3:11 am

Is there a reason that doesn’t work with spaces?


November 17, 2011 | 11:55 am

Try to use the "strcat" object from the "jasch objects"
works for me:

– Pasted Max Patch, click to expand. –

November 17, 2011 | 2:20 pm

this isn’t it either, but maybe a few ideas. possibly [regexp] will be needed somewhere too.

– Pasted Max Patch, click to expand. –

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