saving function state within live set

julienrobert's icon

I'm trying to find a way to store the state of the object "function" inside a live set without using pattrstorage. The reason is that I'm already using pattrstorage to store multiple presets of others objects and I just want to initial that function object. Am i clear enough?

Storing state of M4L objects like live.numbox works fine when enable parameter mode and sending to it varname at first (to avoid pattrstorage to see it). The problem is that function is not a M4L objects and doesn't have that parameter mode enable option...

I tried to bind a pattr object to it but pattrstorage sees it...

Ben Bracken's icon

Function will store its state when you save the device in the editor without any pattr/parameter assistance, but if you want to be able to either change that initial state or save it with a set, you will need to bind a pattr object to it.

For the pattr, you will need to 'enable' parameter mode (@parameter_enable 1) on the pattr, and if you don't want pattrstorage to see it, 'hide from pattrstorage' (@invisible 1).

When you save the device in a set, the last state it was in will be recalled.

If you are looking to do something else, maybe post a simple patch with an explanation.

-Ben

S4racen's icon

Thats so simple, the pattr stores itself rather than relying on pattr storage! I want to save 8 presets for a multislider though without it effecting the pattrstorage so this isn't going to work i don't think... Unless pattr itself can store 8 presets.... Off to search!

Cheers
D

Paul's icon

hi guys...

I'm trying to do pretty much the same thing here....

I don't think I really grasp what you talking about above!?!

I am trying to get [pattr] to save the state of a [textedit] which is to store the file location of some audio loaded into a [buffer~]. The idea being that the file will be recalled when the patch is saved as part of a Ableton Live set (working in MaxforLive here).

I have tried this, but the [textedit] is not stored by [pattr] as part of a Live set. It only works if the patch is loaded in Max.

I tried using the (@parameter_enable 1) on pattr, but this seemed to stop my API mapping from working at all!

So how does this work? How do you get Ableton to save various parameter's as part of set, but not as part of the patch itself???

guygz's icon

Hi guys,
I'm posting this after all this time because I'd like to automate the function object as well.
I understand what you said, but my problem here is that live can't manage parameters of lists... even with a pattr bound to him and hidden from the pattstorage it can't work. (as julien I've got other parameters which I don't want to be recall with the function).

In the inspector you can select the type of the object by selecting "blop".
But when blop is selected the parameter disappear from the live's parameter menu.
So, how can we automate a list exept using the pattern storage ?

And, if there is no other solution than recalling preset, how can I store the preset of the functions in an other storage than all the other objects ?

Here is the example
----------begin_max5_patcher----------
{
    "boxes" : [         {
            "box" :             {
                "maxclass" : "comment",
                "text" : "I don' want to recall it from a preset but automate the movment of the points directly",
                "linecount" : 6,
                "fontname" : "Arial Bold",
                "patching_rect" : [ 499.5, 53.0, 98.0, 74.0 ],
                "frgb" : 0.0,
                "id" : "obj-18",
                "fontsize" : 10.0,
                "numinlets" : 1,
                "numoutlets" : 0
            }

        }
,         {
            "box" :             {
                "maxclass" : "comment",
                "text" : "with enum type for the pattr and still blop for the other, doen't work either: the parameter exist but doesn't recall anything.\nI'll have to store the several list in another object but I don't see how.",
                "linecount" : 8,
                "presentation_rect" : [ 424.5, 59.0, 0.0, 0.0 ],
                "fontname" : "Arial Bold",
                "patching_rect" : [ 345.5, 53.0, 154.0, 96.0 ],
                "frgb" : 0.0,
                "id" : "obj-16",
                "fontsize" : 10.0,
                "numinlets" : 1,
                "numoutlets" : 0
            }

        }
,         {
            "box" :             {
                "maxclass" : "comment",
                "text" : "same probleme for a range slider. I have to automate the two inlets separetelty I suppose ?",
                "linecount" : 4,
                "presentation_rect" : [ 782.5, 10.0, 0.0, 0.0 ],
                "fontname" : "Arial Bold",
                "patching_rect" : [ 781.5, 11.0, 154.0, 51.0 ],
                "frgb" : 0.0,
                "id" : "obj-15",
                "fontsize" : 10.0,
                "numinlets" : 1,
                "numoutlets" : 0
            }

        }
,         {
            "box" :             {
                "maxclass" : "comment",
                "text" : "with blop type on both pattr and function, the parameter is unusable.",
                "linecount" : 3,
                "fontname" : "Arial Bold",
                "patching_rect" : [ 345.5, 11.0, 165.0, 40.0 ],
                "frgb" : 0.0,
                "id" : "obj-14",
                "fontsize" : 10.0,
                "numinlets" : 1,
                "numoutlets" : 0
            }

        }
,         {
            "box" :             {
                "maxclass" : "newobj",
                "varname" : "function-1",
                "text" : "pattr function-1",
                "fontname" : "Arial Bold",
                "patching_rect" : [ 113.0, 11.0, 84.0, 18.0 ],
                "id" : "obj-13",
                "fontsize" : 10.0,
                "numinlets" : 1,
                "outlettype" : [ "", "", "" ],
                "numoutlets" : 3,
                "restore" : [ 1000.0, 0.0, 1.0, 31.914894, 0.186667, 0, 446.808502, 1.0, 0, 771.276611, 0.68, 0, 771.276611, 0.186667, 0, "linear" ],
                "saved_object_attributes" :                 {
                    "annotation_name" : "",
                    "parameter_enable" : 1
                }
,
                "saved_attribute_attributes" :                 {
                    "valueof" :                     {
                        "parameter_longname" : "function-1",
                        "parameter_shortname" : "xfurion",
                        "parameter_type" : 2
                    }

                }

            }

        }
,         {
            "box" :             {
                "maxclass" : "newobj",
                "varname" : "range",
                "text" : "pattr range",
                "fontname" : "Arial Bold",
                "patching_rect" : [ 600.5, 11.0, 63.0, 18.0 ],
                "id" : "obj-12",
                "fontsize" : 10.0,
                "numinlets" : 1,
                "outlettype" : [ "", "", "" ],
                "numoutlets" : 3,
                "restore" : [ 0, 0 ],
                "saved_object_attributes" :                 {
                    "parameter_enable" : 0
                }

            }

        }
,         {
            "box" :             {
                "maxclass" : "rslider",
                "varname" : "rslider",
                "patching_rect" : [ 622.5, 53.0, 159.0, 27.0 ],
                "id" : "obj-11",
                "parameter_enable" : 0,
                "numinlets" : 2,
                "outlettype" : [ "", "" ],
                "numoutlets" : 2
            }

        }
,         {
            "box" :             {
                "maxclass" : "function",
                "varname" : "function",
                "patching_rect" : [ 145.5, 53.0, 200.0, 100.0 ],
                "id" : "obj-3",
                "parameter_enable" : 1,
                "numinlets" : 1,
                "outlettype" : [ "float", "", "", "bang" ],
                "numoutlets" : 4,
                "saved_attribute_attributes" :                 {
                    "valueof" :                     {
                        "parameter_type" : 3,
                        "parameter_invisible" : 1,
                        "parameter_shortname" : "function",
                        "parameter_longname" : "function"
                    }

                }
,
                "addpoints" : [ 31.914894, 0.186667, 0, 446.808502, 1.0, 0, 771.276611, 0.68, 0, 771.276611, 0.186667, 0 ]
            }

        }
,         {
            "box" :             {
                "maxclass" : "newobj",
                "varname" : "jarjarbings",
                "text" : "pattrstorage jarjarbings",
                "fontname" : "Arial Bold",
                "patching_rect" : [ 622.5, 131.0, 123.0, 18.0 ],
                "id" : "obj-5",
                "fontsize" : 10.0,
                "numinlets" : 1,
                "outlettype" : [ "" ],
                "numoutlets" : 1,
                "saved_object_attributes" :                 {
                    "client_rect" : [ 897, 44, 1280, 406 ],
                    "parameter_enable" : 0,
                    "storage_rect" : [ 583, 69, 1034, 197 ]
                }

            }

        }
,         {
            "box" :             {
                "maxclass" : "comment",
                "text" : "R",
                "fontname" : "Arial Bold Italic",
                "patching_rect" : [ 84.0, 100.5, 17.0, 18.0 ],
                "frgb" : 0.0,
                "id" : "obj-25",
                "fontsize" : 10.0,
                "textcolor" : [ 0.3, 0.34, 0.4, 1.0 ],
                "numinlets" : 1,
                "numoutlets" : 0
            }

        }
,         {
            "box" :             {
                "maxclass" : "comment",
                "text" : "L",
                "fontname" : "Arial Bold Italic",
                "patching_rect" : [ 12.0, 100.5, 17.0, 18.0 ],
                "frgb" : 0.0,
                "id" : "obj-26",
                "fontsize" : 10.0,
                "textcolor" : [ 0.3, 0.34, 0.4, 1.0 ],
                "numinlets" : 1,
                "numoutlets" : 0
            }

        }
,         {
            "box" :             {
                "maxclass" : "comment",
                "text" : "Device vertical limit",
                "fontname" : "Arial",
                "hidden" : 1,
                "patching_rect" : [ 0.0, 170.0, 117.0, 18.0 ],
                "frgb" : 0.0,
                "id" : "obj-9",
                "fontsize" : 10.0,
                "numinlets" : 1,
                "numoutlets" : 0
            }

        }
,         {
            "box" :             {
                "maxclass" : "comment",
                "text" : "Audio to Live",
                "fontname" : "Arial Bold Italic",
                "patching_rect" : [ 18.0, 119.5, 81.0, 19.0 ],
                "frgb" : 0.0,
                "id" : "obj-7",
                "fontsize" : 11.0,
                "textcolor" : [ 0.3, 0.34, 0.4, 1.0 ],
                "numinlets" : 1,
                "numoutlets" : 0
            }

        }
,         {
            "box" :             {
                "maxclass" : "comment",
                "text" : "MIDI from Live",
                "fontname" : "Arial Bold Italic",
                "patching_rect" : [ 12.0, 6.5, 88.0, 19.0 ],
                "frgb" : 0.0,
                "id" : "obj-6",
                "fontsize" : 11.0,
                "textcolor" : [ 0.3, 0.34, 0.4, 1.0 ],
                "numinlets" : 1,
                "numoutlets" : 0
            }

        }
,         {
            "box" :             {
                "maxclass" : "newobj",
                "text" : "plugout~",
                "fontname" : "Arial Bold",
                "patching_rect" : [ 30.0, 100.5, 53.0, 18.0 ],
                "id" : "obj-2",
                "fontsize" : 10.0,
                "numinlets" : 2,
                "outlettype" : [ "signal", "signal" ],
                "numoutlets" : 2
            }

        }
,         {
            "box" :             {
                "maxclass" : "newobj",
                "text" : "midiin",
                "fontname" : "Arial Bold",
                "patching_rect" : [ 30.0, 27.5, 40.0, 18.0 ],
                "id" : "obj-1",
                "fontsize" : 10.0,
                "numinlets" : 1,
                "outlettype" : [ "int" ],
                "numoutlets" : 1
            }

        }
],
    "lines" : [         {
            "patchline" :             {
                "source" : [ "obj-13", 1 ],
                "destination" : [ "obj-3", 0 ],
                "hidden" : 0,
                "disabled" : 0
            }

        }
,         {
            "patchline" :             {
                "source" : [ "obj-12", 1 ],
                "destination" : [ "obj-11", 0 ],
                "hidden" : 0,
                "disabled" : 0
            }

        }
],
    "appversion" :     {
        "major" : 6,
        "minor" : 1,
        "revision" : 2,
        "architecture" : "x86"
    }

}
-----------end_max5_patcher-----------