How do I save typed text in the Text Edit object?

Debrecini's icon

Hiya I'm completely new with Max but I want to use the text edit object to label dials in my device. Its for a generic MIDI editor patch I'm making.

Now with the text edit object the user can edit the text box which is fine. But I want it so that upon save and load in Ableton it should recall the text previously typed.

Currently I type something into a Text Edit I hit save in Live. Open the Live set again and whatever I previously typed is gone.

I need it so the end user can change whats typed into the label and every time they save their live set and load it again its exactly how they left it.

I'm sure its very simple once you know how but I'm very new to this. Please help.

Bernt Isak's icon

You should use live.-objects when you want something stored with the Live sets. If you connect the text edit object to a live.text, the text should be stored in the live.text object and you could (if you don't wanna use the live.text as labels) recall the text from these back to the text edit objects upon loading the patch. If you wanna be abel to have spaces in the text, just activate "Output to one symbol" in the text edit object.

Debrecini's icon

Hi thanks for getting back to me. I tried using a live.text like you said but again it did not save it with the live set. I've attached a picture of what I did. Perhaps I'm doing something wrong?

524.Screen_Shot.png
png
Bernt Isak's icon

That is kind of weird. The text is saved with the Live set at my computer using the exact same patching. Maybe you should post your patch here.

Here's the patch I made to test the problem:

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

Debrecini's icon

Maybe I should have been more specific. It works if you type into the textedit from within the max for live environment. But it does not work for the end user. In other words if I type into the textedit box from within the Live track view it doesn't save the text with the set.

Oh and in case anyone was wondering the prepend set and message objects within white boxes in the picture was just an alternative to using a print object. So you could see the result of different parts of the patch chain.

Bernt what do I do with that text you just posted, forgive me for being a noob but I dont have a clue what I'm supposed to do with that.

Cheers for getting back to me again, I'll upload my patch for you.

529.Text_Label.amxd
amxd
Debrecini's icon

It's ok I figured out what you do with that text you posted, you simply select file menu in Max and and click on "New From Clipboard"

So I loaded your patch and the same is occurring. Try this and you will see what I mean. Load your patch into a track in live. Dont open the Max environment just use it as if you were the end user in Live. Now type something into the textedit box. You will see the live.text below change accordingly so all looks well at this point. So save the set and reload it. You will find that it still does not recall the text the end user typed in. This is the case for both the textedit and the live.text objects.

This is trickier to achieve than I thought it would be.

Bernt Isak's icon

I guessed I cut some corners there. I've actually never tried to store text in live.text with a Live set until you dropped this post. I just knew that this method could be used to store values with live.numbox. And when I made the example patch I never tried to change the text inside Live as you described.

The solution is actually quite simple. You can just skip the live.text object and connect a pattr object to the text edit object. Here is a simple example patch. Let me know if this works out for you or not.

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

Debrecini's icon

oh my that is simple, works a treat.

I was actually experimenting with the coll object and saving to a text file and recalling on patch load but your way is much more simple and a hell of a lot less bulky.

So cheers for all the help, you've been great.

Bernt Isak's icon

No problem!

Cheers!

broc's icon

It works basically, but doesn't seem to recall formatting with carriage return.

Is this normal behavior?

Bernt Isak's icon

Seems like it is. The carriage return is output in the ASCII-outlet, but I can't see that it's ever given in the output text. Neither are spaces (more than one). I might have overlooked some argument or something, but I think it's the default behavior even though you'll might be able to change this behavior.

Rob Gordon's icon

huge help. thanks guys!

Yot Magnet's icon

Simpler way > Just check the "Paramater Mode Enable" in the textedit inspector.