Storing KeyValue-Pairs in LiveSet

Questions and discussion about building and using Max for Live devices
Post Reply
charlybeck
Posts: 112
Joined: Sat Sep 18, 2010 1:42 pm

Storing KeyValue-Pairs in LiveSet

Post by charlybeck » Sat Apr 18, 2020 1:06 am

Hi,

simple question, maybe hard to solve (?)

I have a list of key-value pairs.
Key is type int,
value is of type float

stored in a coll-object it looks for example like this:

Code: Select all

4, 0.;
5, 0.43;
7, 0.415;
6, 0.4725;
10, 0.;
I wanna store this data in the ableton liveset.

Should be simple to do but somehow i have the feeling something's missed here.

Workaround?
If this is the only way i was allready thinking to write a "dummy vst plugin" which i would instantiate within the m4l patch using a second vst~ object.
The only purpuse of this vst plugin would be to provide a "huge" number of parameters which i set and request when i need the data.
However, this is not a clean solution. A clean solution would be an Attribute "Store in Host" for the coll object. There is allready a "Store in Patcher" Attribute but this is a difference and not what i need.

Solution i found but seems to be insufficient for me
I found one suggestion to use a matrixctrl and pattrstorage object but matrixctrl can only store a very limitied number of states per cell. But I need to store a float value per cell. So this seems not to work for me since i didn't find a way to set datatype of matrixctrl.cell to float.

Background:
I wanna use the vst~ object to load a plugin whichs name is given in a textedit object. The problem here is that the the storing of the plugin parameters seem to work only when i give the name of the vst plugin as a parameter in the vst~ object. But since i have a textbox where the user can enter the plugin name the plugin resets to initial values everytime i load the m4l device. This is why a created some handlers to store and restore the parameters. This basically works, it's just the parameters need to be stored in the live set (without the user require to take actions like pressing save buttons or selecting xml file paths and so on)

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

Re: Storing KeyValue-Pairs in LiveSet

Post by doubleUG » Sat Apr 18, 2020 6:50 am

you can use dict with parameter mode on, use pull_from_coll to write the coll in the dict and push_to_coll to write the dict into coll

<pre><code>
----------begin_max5_patcher----------
620.3ocwVssaiBCD8YhT9GP94jHtlK6uwtuUsBY.2DWA1HaCMUU8eu9B1IsE
nzpn1GRbXlgLyYNmYfmWtvCjSOi3.++3emum2yRKdZaJKdVCdfZ34hJHWGHn
Fw4viHvpdmBzYg1QSK+TlflUPqp7Wud8+PbgKJRaMsUTgD5+jPqYbo9Vo4Or
NbmK3Fnn3DlbLigJDlpaaPzlfU9woIpivfX0QTvl.++auKy+u3oFj4V.fK9j
oGSrYORa7kkKTmxiU2BrWUkcOiV+sQexTnOMMUi9ndze3WA84sBAk7U.Uzjf
JLPCpPMnhbeOAlxgjiWgqFHCViDHVFh.yqzQELHnCu8TdnjH7i7i8S9BcjI0
3wGzrbjogjF7qPxk3BwlNL5wQPUv.nJcJTkrSO4lremQ6F3NFo1+9bEA8nrb
bESGjQj5CGr9HGprpFV+qfxPi.3jA.bxL.b7g8pisoyfFU0AlRfrm.qjjp8y
Xjq0JG1gJyjEjL2YPgfgkinl84dW5Qd.TcNp7Zxa3QmvA7VCaZbiVF2JJ4ME
fKySUCcvpVD8dqcmiqSFlzg432WMWGQEkbbPN8MQwOQYhOOLKAD26qWxc4G2
.MnSpMimKLjRKbRkl4ghQFAW594rvXF5qvag9RVkRtT93Bo4si0VME.nBS9v
agngqxw6Z1bZKqvhF66M3eEjKkMXLAJ5y8ctIVUPiSqyOeI+v4K5mMeypcFd
yR2r5loCltd0ibCUGhY0ZlLImIefxTWuek4ZLwbsQbCXnNm7L1XBxjyWBoTu
kYVbbda+ddPMsDwHsX6im5WABzi8pEM7FnAU50CKWHC3UzNIOxB
-----------end_max5_patcher-----------
</code></pre>

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

Re: Storing KeyValue-Pairs in LiveSet

Post by doubleUG » Sat Apr 18, 2020 7:17 am

or use multislider

charlybeck
Posts: 112
Joined: Sat Sep 18, 2010 1:42 pm

Re: Storing KeyValue-Pairs in LiveSet

Post by charlybeck » Sun Apr 19, 2020 7:32 pm

doubleUG wrote:
Sat Apr 18, 2020 6:50 am
you can use dict with parameter mode on, use pull_from_coll to write the coll in the dict and push_to_coll to write the dict into coll
Ah thank you this should do the thing.

Actually i'm no more sure wether i need this. I can not really tell what the vst object's expected behaviour is regarding persistency of the loaded plugin and it's parameters since it turns out to be very unstable... Max crashes frequently, when i think i can reproduce the crash it disappears.... Not really nice behaviour but i keep investigating.... 8O :roll:

Post Reply