beginner having trouble with text object and prepend

annad's icon

I'm trying to get text out of a text object into a message box with the word "speak" prepended. I imagine it's simple, but I can't figure it out. Here are two examples, one with the text object sending text to the message and one that doesn't work but shows where I would like to insert prepend somehow. Thanks for your help!

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

Christopher Dobrian's icon

How about [prepend set speak] (to message box left inlet)?
Or alternatively [prepend speak] (to message box right inlet).

annad's icon

Thanks for the suggestions. I tried them. [prepend set speak] into the left message inlet and [prepend speak] into the right don't do anything. I wondered if I had to set it in motion with a bang, so I connected a button to the prepend object. When I banged it, it cleared the message box and put [speak bang] in it (the one into the left inlet put [set speak bang]. so then I tried using the middle outlet of the text object to send the bang to it. That had no effect: the text went into the message box without [speak] prepended.

But! I did manage to get speak prepended into a second message box (with the prepend object connected between the 2 message boxes) by connecting the dump message to the first message box as well as to the text object. Kind of convoluted, but at least it works!

thanks for your kind attention!

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

place a "route set " on the output of text object ? "Set xxx" to prepend changes the thing it has to prepend.
zz

annad's icon

That works!
Thanks very much.