What do you use to store values ?

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

What do you use to store values ?

Post by chapelier fou » Thu May 05, 2022 3:29 pm

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 ?
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: What do you use to store values ?

Post by doubleUG » Thu May 05, 2022 5:29 pm

if its one value then [int] or [float] with parameter mode enabled. Many values > [multislider]. Complex things > [dict]. Sometimes [textedit]
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

11olsen
Posts: 157
Joined: Wed Jul 29, 2009 9:12 pm
Location: germany

Re: What do you use to store values ?

Post by 11olsen » 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.

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

Re: What do you use to store values ?

Post by chapelier fou » Thu May 05, 2022 7:51 pm

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.
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: 6025
Joined: Mon May 15, 2006 12:15 pm

Re: What do you use to store values ?

Post by chapelier fou » Thu May 05, 2022 7:52 pm

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 !
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: 6025
Joined: Mon May 15, 2006 12:15 pm

Re: What do you use to store values ?

Post by chapelier fou » Thu May 05, 2022 7:56 pm

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' ?
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: 6025
Joined: Mon May 15, 2006 12:15 pm

Re: What do you use to store values ?

Post by chapelier fou » Thu May 05, 2022 7:58 pm

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'
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

11olsen
Posts: 157
Joined: Wed Jul 29, 2009 9:12 pm
Location: germany

Re: What do you use to store values ?

Post by 11olsen » 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!

[jur]
Site Admin
Posts: 5405
Joined: Mon Jun 01, 2015 3:04 pm
Location: Ableton

Re: What do you use to store values ?

Post by [jur] » Fri May 06, 2022 12:36 am

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 :wink:

Regarding the topic's question... [message] 🙄
Ableton Forum Moderator

11olsen
Posts: 157
Joined: Wed Jul 29, 2009 9:12 pm
Location: germany

Re: What do you use to store values ?

Post by 11olsen » Fri May 06, 2022 6:39 am

You can copy/paste the code :wink:
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]?

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

Re: What do you use to store values ?

Post by chapelier fou » Fri May 06, 2022 6:53 am

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.
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

11olsen
Posts: 157
Joined: Wed Jul 29, 2009 9:12 pm
Location: germany

Re: What do you use to store values ?

Post by 11olsen » Fri May 06, 2022 7:27 am

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.

[jur]
Site Admin
Posts: 5405
Joined: Mon Jun 01, 2015 3:04 pm
Location: Ableton

Re: What do you use to store values ?

Post by [jur] » Fri May 06, 2022 8:46 am

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 :D
Ableton Forum Moderator

[jur]
Site Admin
Posts: 5405
Joined: Mon Jun 01, 2015 3:04 pm
Location: Ableton

Re: What do you use to store values ?

Post by [jur] » Fri May 06, 2022 8:49 am

11olsen wrote:
Fri May 06, 2022 6:39 am
You can copy/paste the code :wink:
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.
Ableton Forum Moderator

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

Re: What do you use to store values ?

Post by chapelier fou » Fri May 06, 2022 9:08 am

Well, [dict] seems to be really good for basic storage. I'll go with this.
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

Post Reply