Page 1 of 1
What do you use to store values ?
Posted: Thu May 05, 2022 3:29 pm
by chapelier fou
Genuine question. What’s a good way to store a value saved with the live set ?
For instance, a ‘hidden’ live.dial does the job but what are the most elegant ways ? Dicts ?
Re: What do you use to store values ?
Posted: Thu May 05, 2022 5:29 pm
by doubleUG
if its one value then [int] or [float] with parameter mode enabled. Many values > [multislider]. Complex things > [dict]. Sometimes [textedit]
Re: What do you use to store values ?
Posted: Thu May 05, 2022 7:23 pm
by 11olsen
[int] and [float] have no parameter mode. You probably mean [number]. But yes, look for objects that have the parameter mode option. Also [pattr @parameter_mode 1] can recall a single value of any type with the Set.
Re: What do you use to store values ?
Posted: Thu May 05, 2022 7:51 pm
by chapelier fou
Woah. I never knew I could parameter enable [int] or [float]. After all these years. I'm glad I did ask,
and thanks again, @doubleUG.
Re: What do you use to store values ?
Posted: Thu May 05, 2022 7:52 pm
by chapelier fou
11olsen wrote: ↑Thu May 05, 2022 7:23 pm
[int] and [float] have no parameter mode. You probably mean [number]. But yes, look for objects that have the parameter mode option. Also [pattr @parameter_mode 1] can recall a single value of any type with the Set.
Ah, so I wasn't so ignorant. Thanks !
Re: What do you use to store values ?
Posted: Thu May 05, 2022 7:56 pm
by chapelier fou
Still, I'm not originally a coder, but I 'philosophically' felt that it's bad to use a 'graphical' object to store values.
Wouldn't it be great if [int] and [float] were able to be 'parameter enabled' ?
Re: What do you use to store values ?
Posted: Thu May 05, 2022 7:58 pm
by chapelier fou
11olsen wrote: ↑Thu May 05, 2022 7:23 pm
Also [pattr @parameter_mode 1] can recall a single value of any type with the Set.
Well, I just tried with [pattr] and [int]. 'pattr does not support this object'
Re: What do you use to store values ?
Posted: Thu May 05, 2022 11:55 pm
by 11olsen
The pattr itself is your parameter container. You don't need to bind to an object.
Really? This forum doesn't allow us to add example amxd device to a post? How lame!
Re: What do you use to store values ?
Posted: Fri May 06, 2022 12:36 am
by [jur]
11olsen wrote: ↑Thu May 05, 2022 11:55 pm
The pattr itself is your parameter container. You don't need to bind to an object.
Really? This forum doesn't allow us to add example amxd device to a post? How lame!
You can copy/paste the code
Regarding the topic's question... [message]

Re: What do you use to store values ?
Posted: Fri May 06, 2022 6:39 am
by 11olsen
You can copy/paste the code

Still lame. The other side has to create a new device first to try things.
Is this a security concern or why can we not attach a file to a post?
Regarding the topic's question... [message]
How do you store something with the Liveset in a [message]?
Re: What do you use to store values ?
Posted: Fri May 06, 2022 6:53 am
by chapelier fou
11olsen wrote: ↑Fri May 06, 2022 6:39 am
How do you store something with the Liveset in a [message]?
I don’t think it’s possible.
Re: What do you use to store values ?
Posted: Fri May 06, 2022 7:27 am
by 11olsen
Additionally to the Live objects which are parameters by default, you can set the "parameter_enable" attribute for these objects:
jit.playlist live.arrows attrui button chooser crosspatch dial dict flonum function gswitch gswitch2 incdec itable js jsui kslider led matrixctrl mc.function multirange multislider nodes nslider number pattr pattrstorage pictctrl pictslider radiogroup rslider slider swatch tab table textbutton textedit toggle ubutton umenu amxd~ filtergraph~ gain~ mc.amxd~ mc.gain~ mc.playlist~ mc.table~ mc.vst~ mcs.amxd~ mcs.vst~ playlist~ table~ vst~.
No guarantee for completeness.
Re: What do you use to store values ?
Posted: Fri May 06, 2022 8:46 am
by [jur]
11olsen wrote: ↑Fri May 06, 2022 6:39 am
How do you store something with the Liveset in a [message]?
My bad, I didn't meant in a live set.
I should read the topics

Re: What do you use to store values ?
Posted: Fri May 06, 2022 8:49 am
by [jur]
11olsen wrote: ↑Fri May 06, 2022 6:39 am
You can copy/paste the code

Still lame. The other side has to create a new device first to try things.
I know...
Let's see if we can improve things in this area.
Re: What do you use to store values ?
Posted: Fri May 06, 2022 9:08 am
by chapelier fou
Well, [dict] seems to be really good for basic storage. I'll go with this.