Page 1 of 2

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

Posted: Fri Feb 21, 2014 5:15 pm
by chapelier fou
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 ? )

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

Posted: Fri Feb 21, 2014 5:59 pm
by chapelier fou
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 ?

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

Posted: Fri Feb 21, 2014 6:42 pm
by doubleUG

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

Posted: Fri Feb 21, 2014 7:02 pm
by chapelier fou
Ha ! textedit + pattr !

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

Posted: Fri Feb 21, 2014 7:02 pm
by chapelier fou
Anyway, if anyone has suggestions ..

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

Posted: Sat Feb 22, 2014 2:17 am
by toscanini
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

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

Posted: Sat Feb 22, 2014 9:03 am
by chapelier fou
Thank you !
i guess textedit + pattr is ok.
But populating live.menu would be more elegant....

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

Posted: Sat Feb 22, 2014 1:43 pm
by regretfullySaid
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?

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

Posted: Sat Feb 22, 2014 4:23 pm
by chapelier fou
Thanks ! i never dug into dicts. For some reasons it seemed complicated. i'll have a look.

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

Posted: Sat Feb 22, 2014 6:29 pm
by regretfullySaid
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.

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

Posted: Sun Feb 23, 2014 12:26 am
by chapelier fou
Many thanks for the help !

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

Posted: Sun Feb 23, 2014 6:51 pm
by toscanini
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?

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

Posted: Sun Feb 23, 2014 7:27 pm
by regretfullySaid
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

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

Posted: Sun Feb 23, 2014 7:58 pm
by toscanini
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

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

Posted: Sun Feb 23, 2014 9:17 pm
by regretfullySaid