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

May 6, 2010 at 2:52am

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

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.

#50211
May 6, 2010 at 7:09am

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.

#180198
May 7, 2010 at 8:14pm

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?

[attachment=131972,524]

Attachments:
  1. Screen_Shot.png
#180199
May 8, 2010 at 8:49am

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:

– Pasted Max Patch, click to expand. –
#180200
May 8, 2010 at 2:50pm

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.

Attachments:
  1. Text_Label.amxd
#180201
May 8, 2010 at 3:15pm

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.

#180202
May 8, 2010 at 5:32pm

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.

– Pasted Max Patch, click to expand. –
#180203
May 8, 2010 at 8:28pm

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.

#180204
May 9, 2010 at 4:29pm

No problem!

Cheers!

#180205
May 13, 2010 at 11:20am

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

Is this normal behavior?

#180206
May 18, 2010 at 1:41pm

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.

#180207

You must be logged in to reply to this topic.