how to manually input text and save it with the live set ?

Learn about building and using Max for Live devices.
chapelier fou
Posts: 6020
Joined: Mon May 15, 2006 12:15 pm

how to manually input text and save it with the live set ?

Post by chapelier fou » Fri Feb 21, 2014 5:15 pm

Is there a way to manually type a text in a device and have it saved within the live set ?

( The reason is :
i want to make a device that triggers functions or set values on several parameters or elements. I could have a live.menu system like the LOM navigator but i think it would be CPU intensive when it comes to set many different functions/values settings. So i thought about having little boxes where i could just type the live.pathes and functions to call. Is it silly ? )
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

chapelier fou
Posts: 6020
Joined: Mon May 15, 2006 12:15 pm

Re: how to manually input text and save it with the live set ?

Post by chapelier fou » Fri Feb 21, 2014 5:59 pm

Well i thought i could use live.menus and populate them, but it is impossible, in contrary to umenu. But data stored in umenus cannot be stored with a live set, can it ?
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

doubleUG
Posts: 249
Joined: Sun Apr 24, 2011 7:19 am

Re: how to manually input text and save it with the live set ?

Post by doubleUG » Fri Feb 21, 2014 6:42 pm

copy the text, open Live > drag in empty M4L device > open Max editor > paste > save M4L device
https://docs.cycling74.com/max8/vignett ... ng_patches

https://doubleUG.bandcamp.com/releases

chapelier fou
Posts: 6020
Joined: Mon May 15, 2006 12:15 pm

Re: how to manually input text and save it with the live set ?

Post by chapelier fou » Fri Feb 21, 2014 7:02 pm

Ha ! textedit + pattr !
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

chapelier fou
Posts: 6020
Joined: Mon May 15, 2006 12:15 pm

Re: how to manually input text and save it with the live set ?

Post by chapelier fou » Fri Feb 21, 2014 7:02 pm

Anyway, if anyone has suggestions ..
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

toscanini
Posts: 410
Joined: Thu May 05, 2005 5:42 pm

Re: how to manually input text and save it with the live set ?

Post by toscanini » Sat Feb 22, 2014 2:17 am

I asked something similar a while ago and I would swear I had received a message then, but it doesn't show now. I try to remember if I use the solution in any patch.

viewtopic.php?f=35&t=185597

chapelier fou
Posts: 6020
Joined: Mon May 15, 2006 12:15 pm

Re: how to manually input text and save it with the live set ?

Post by chapelier fou » Sat Feb 22, 2014 9:03 am

Thank you !
i guess textedit + pattr is ok.
But populating live.menu would be more elegant....
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

regretfullySaid
Posts: 8913
Joined: Thu Apr 22, 2010 5:50 pm

Re: how to manually input text and save it with the live set ?

Post by regretfullySaid » Sat Feb 22, 2014 1:43 pm

If the text saving part is the problem you're having, I've been using dicts. They should just save if ou enable Parameter Mode. Then just populate the menu when the device loads?
ImageImage

chapelier fou
Posts: 6020
Joined: Mon May 15, 2006 12:15 pm

Re: how to manually input text and save it with the live set ?

Post by chapelier fou » Sat Feb 22, 2014 4:23 pm

Thanks ! i never dug into dicts. For some reasons it seemed complicated. i'll have a look.
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

regretfullySaid
Posts: 8913
Joined: Thu Apr 22, 2010 5:50 pm

Re: how to manually input text and save it with the live set ?

Post by regretfullySaid » Sat Feb 22, 2014 6:29 pm

I don't think it's as complicated as it looks, it just doesn't seem to have much documentation. To be fair, I'm not sure it needs much, but it could be more clear about some things, like you have to use a workaround if you want to add to an array. I haven't had to bother with any extra dict.??? stuff, just the actual [dict].

Typical functions are [set], [get] and [getkeys] to dump the whole dict.
If you have an array like -

Code: Select all

"key"; ["text", 69, "coffee", 42]
you can use- '

Code: Select all

set "key"[2] foo
' and the array would be

Code: Select all

["text", 69, "foo", 42]
I usually use the id as the key and you can use the text as one of the values.
That way if you want to store and recall settings to a specific live id, then you can take the incoming id and prepend either 'set' or 'get'.
To be more detailed, I strip the 'id' off with [route id] and then prepend 'set', so they keys are just the id number, not 'id 4324', just '4324'.
Do the same with an incoming id but first you need to get it in quotes so I use [tosymbol], then [prepend get], so it would be 'get "4324"'

That could easily sound confusing but make more sense as you're doing it.
ImageImage

chapelier fou
Posts: 6020
Joined: Mon May 15, 2006 12:15 pm

Re: how to manually input text and save it with the live set ?

Post by chapelier fou » Sun Feb 23, 2014 12:26 am

Many thanks for the help !
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

toscanini
Posts: 410
Joined: Thu May 05, 2005 5:42 pm

Re: how to manually input text and save it with the live set ?

Post by toscanini » Sun Feb 23, 2014 6:51 pm

I am pretty excited about [dict] after watching the tutorial. For those of us who have no javascript background (that's the code, right?) could somebody please point out links where one can learn about dictionaries in general, in a way that can be taken advantage of here?

regretfullySaid
Posts: 8913
Joined: Thu Apr 22, 2010 5:50 pm

Re: how to manually input text and save it with the live set ?

Post by regretfullySaid » Sun Feb 23, 2014 7:27 pm

For me I've learned through youtube, the reference/example patches and the c74 forum.

https://www.google.com/search?q=site%3A ... orums+dict
ImageImage

toscanini
Posts: 410
Joined: Thu May 05, 2005 5:42 pm

Re: how to manually input text and save it with the live set ?

Post by toscanini » Sun Feb 23, 2014 7:58 pm

Yes, I typically need to understand the terminology, "keys" and "values" and such, which the examples in your link, as far as I could check, already take for granted. And it is a bit hard to google "dictionary" :P


Post Reply