Pattr, Pattrstorage and Parameter Mode Enable

Learn about building and using Max for Live devices.
hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Pattr, Pattrstorage and Parameter Mode Enable

Post by hoffman2k » Sun Oct 25, 2009 8:27 pm

I'm trying to use pattr and pattrstorage to save a group of integers with my live set.
An integer goes into pattr, pattrstorage is used to collect these integers. When my set loads, I want to use pattrstorage to tell which value goes to pattr.

I'm having no problems with this in Max, but I do have some problems in Max for Live.
Parameter Mode is enabled, but I'm not sure what else is needed.
And does parameter mode need to be enabled on both pattr and pattrstorage or just one of them?

I've added a patch to illustrate the problem. I need the values in stored in pattrstorage to still be inside the object when I load a set. Any ideas where I'm wrong?

Cheers

- Bjorn

Code: Select all

----------begin_max5_patcher----------
870.3oc0W00aaBCE8YxuBDZOlEg4i.rGlz1eiopHSvIwcfcjsSZ5p5+8YafD
ShgRR2hZqTozqsu2y8bubr8KSb7xoGPbO2u49KWGmWl33nMoL3z7+NdUvCKK
gb8z7VRqpPDg2z5wDnCBscFZIrrz86sCP1UQ2IJQB8x7arthRDb7ePJa.+Ys
l2BEK2fIqWH8hnFMgYxQcSCUOizOAoy7cenYE3BcTo4O90LiPhIsQDXDQBrR
GQuevvvR2eRKK7Ti95jIpGSGYpK8eNhYOACZrVaR77VTcZ3gUbkqWNjr16H5
GOMTS.oApmw9CQCIexoAvr3rXPZRyXaTcVKokTVsG7mkl3GmlN05a.CNwBKB
R.JpKLVSiIpmA9FKQvvbY6qFH9yxtjbACyt4q6hz4xeRlZ8MSjdYQ4VpG46D
BJwd8.zW8nagvFkEkdhxB7ufxLImT6jyszagdR5wKDWvWY1o51FUWV+I97Zk
G47GHwsK8D7Os7Vg3b3ZzEbBWPYH2u.tRp48xKoZc43fgjhB7uC7R2Vk8P1Q
WJP7K2eRlQBlhyjboq4Lde71fh2f.MkA.AmXt93rnaR9tYXNbOpXgzMxPuPk
nXonP895NGoOGukkX4V2l.TUJyjM6wpOuyxZAliWCSYtgrbFf4x4FIeKJd9o
4tExjPSfXKPDXdsJp9ieU0zDfGQ1.XbOrbGhtp0bqcynTI6CzwHHok8OabLo
VI21ns0zPKigIXgjaMxCadfugxD151NyW6wbbKcXClzh2HQfDBU.EXJYwwvY
KTkTx52DOpvMDuThI+V4DdeosxAzhdYELYEsWDRYEHVeqbmj048tT9VDpnDW
0a0Pf11KlQG1RIpiqpX4Y8FbwyMkI+5InkhZ+ymfSIVu+b8QlG9Thg2sSI1q
77JJ0t5rqwHc4svdUkm176MSZf4ZRCLDoAdOZyLjdm5Sw7XDFopsM4U+au+b
nySHs+DlTPe5Nt4Xzo64opE13+3q73DWzzpcpmTg6765pwkxdWBiS2wV1lbM
Hv8DzJjkTLQKLaLmnNyYCtn.QLu6aEtXKU9gdCDbevZwarHRcFqOXPJ4CGh.
iARpSw6BteXJaDX5rp6+cLkNVd5NhoQ.ov6JhBGCIccHJHSc+x45KYCzZfcd
Weq65onTF6nnM40I+E.EDfpg
-----------end_max5_patcher-----------

stefan-tiedje
Posts: 219
Joined: Thu Sep 17, 2009 3:50 pm
Location: Berlin

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by stefan-tiedje » Mon Oct 26, 2009 8:20 am

If you want the pattr to be remembered, I'd put the parameter mode enable on the pattr itself. I guess (didn't test) the parameter mode enable for the pattrstorage would simply recall the last preset, which is something different. If both are enabled there might be a conflict between the value the preset sets, and the pattr value remembered by Live.
In your example though, I'd replace the number box with a live.numbox, which is enabled by default...

Stefan
Les Ondes Mémorielles-----x---
--____-----------|----------|----
--(_|_ ----|\-----|-----()--------
-- _|_)----|-----()---------------
----------()----------TJ Shredder
http://tjshredder.wordpress.com/

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by hoffman2k » Mon Oct 26, 2009 8:30 am

stefan-tiedje wrote:If you want the pattr to be remembered, I'd put the parameter mode enable on the pattr itself. I guess (didn't test) the parameter mode enable for the pattrstorage would simply recall the last preset, which is something different. If both are enabled there might be a conflict between the value the preset sets, and the pattr value remembered by Live.
In your example though, I'd replace the number box with a live.numbox, which is enabled by default...

Stefan
Thanks for the reply.

I broke the patch down to the bare minimum, so the global idea may be lost. I don't want a value to be recalled on load which is what pattr does. It also only stores one value.
I would like to store multiple values in pattrstorage and output them out of pattr as a preset is recalled.

There are a few pattr instances in my patch I would like to link to pattrstorage. I assumed pattrstorage would save multiple presets. I mean, what other use would there be for parameter mode in this object?

I can work around this problem. But I just want to understand how pattrstorage works in relation to storing data within a Live set.

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by hoffman2k » Mon Oct 26, 2009 5:23 pm

To simplify my question: What would be the best way to store multiple lists in a Live Set without creating external files?

stefan-tiedje
Posts: 219
Joined: Thu Sep 17, 2009 3:50 pm
Location: Berlin

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by stefan-tiedje » Tue Oct 27, 2009 2:44 pm

hoffman2k wrote:To simplify my question: What would be the best way to store multiple lists in a Live Set without creating external files?
pattrstorage would always need a file, but you could use the preset UI object if its not connected to a pattrstorage. It will save its presets in the patch by default. If you connect a pattr or live.numbox to select a preset you get it recalled in Live. Other options include storing data in a coll or in a bunch of loadmesses (but thats a mess) if you simply need initializing values, autopattr is your friend. Just throw one in, and name your UI objects...

Stefan
Les Ondes Mémorielles-----x---
--____-----------|----------|----
--(_|_ ----|\-----|-----()--------
-- _|_)----|-----()---------------
----------()----------TJ Shredder
http://tjshredder.wordpress.com/

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by hoffman2k » Tue Oct 27, 2009 2:58 pm

I thought I just missed something in regards to pattrstorage. I can't see the use for parameter mode if it does not actually store multiple presets which is the objects main function.

Cheers for the suggestions. I'm essentially just trying to store multiple values of a given pattr (or integer with name) and have 8 of these that recall a value when a preset is called.

I can work around it, but wanted to make sure I wasn't missing something. As pattrstorage seems like the most efficient way to handle a large number of non-sequential presets.

Does the preset object have any problems dealing with preset numbers going up into the thousands. Even if only a handful of presets are stored. (eg. 1, 100001, 5,...)
I know coll does this, but coll data can't be saved with a Live Set.

Cheers

- Bjorn

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by hoffman2k » Thu Oct 29, 2009 10:22 pm

I got it working nicely with coll now. Though I do have to store the data externally.

Could somebody just answer the following question please: In which scenario would you use Parameter Mode on Pattrstorage?

Stefan suggested earlier it would simply recall the last preset, but it doesn't even do that.

matcham
Posts: 29
Joined: Fri Mar 06, 2009 1:35 pm

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by matcham » Fri Oct 30, 2009 7:51 am

In which scenario would you use Parameter Mode on Pattrstorage?
if I remember well, I think that I've read somewhere (probably in the beta mailing list before this forum exists) that pattrstorage in parameter mode ise supposed to store all it's presets internally (and in devices presets...) without the need of any .xml / .json file.
(and I would really love to see it working like this !)
But obviously, this feature do not works actually ; should we make a bug report about it ?
please, someone from cycling'74, can you explain what this parameter mode is supposed to do ?

MathieU
________________
Mathieu Chamagne
http://mathieuchamagne.com

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by hoffman2k » Fri Oct 30, 2009 8:35 am

matcham wrote:
In which scenario would you use Parameter Mode on Pattrstorage?
if I remember well, I think that I've read somewhere (probably in the beta mailing list before this forum exists) that pattrstorage in parameter mode ise supposed to store all it's presets internally (and in devices presets...) without the need of any .xml / .json file.
(and I would really love to see it working like this !)
But obviously, this feature do not works actually ; should we make a bug report about it ?
please, someone from cycling'74, can you explain what this parameter mode is supposed to do ?

MathieU
Well if its not just me, then it could be a bug.
Either we don't understand what is it supposed to do or it doesn't work.
The only thing I could find on the list was Jeremy mentioning he's working on it, but that was months ago.

monolake
Posts: 119
Joined: Sun Mar 09, 2003 9:42 am
Location: Berlin
Contact:

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by monolake » Fri Oct 30, 2009 10:13 am

I have to admit that I also struggle with many preset / storage issues right at the border between not understanding, bug, ...
I would be curious to see solutions / patches that deal elegantly with lots of parameters, including soundfiles...

Robert

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by hoffman2k » Fri Oct 30, 2009 10:41 am

monolake wrote:I have to admit that I also struggle with many preset / storage issues right at the border between not understanding, bug, ...
I would be curious to see solutions / patches that deal elegantly with lots of parameters, including soundfiles...

Robert
When it comes to storing paths I'm currently using coll. And since I want multiple paths on a line, I need to convert the paths to a symbol. So I got something like "pack i s s s s" going to the coll and "unpack s s s s" coming out. Its a bit of a hack and requires an external file. But it works..

It would be much easier to just have a pattr for everything you wish to load and control them with a pattrstorage which stores everything with the set.
All the examples currently included seem to focus on storing a single parameter to be recalled on loading a set.

Anyway, now we got a few experienced Max users with the same issue. Time for a bug report I suppose.

monolake
Posts: 119
Joined: Sun Mar 09, 2003 9:42 am
Location: Berlin
Contact:

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by monolake » Fri Oct 30, 2009 11:15 am

Well, I came up with an idea that seems to be super smart when it comes to sotre and recall parameters for usage with Poly~ , but I ran into tons of problems that no one could solve yet.
Before I explain my idea, here is the patcher:

www.monolake.de/ml-Test_08_buffer.amxd.zip

It would be so great:

- no wires etc needed between UI elements and engine
- parameter names as shown in Live UI are the ones that are passed to poly~ ( no confusion ! )
- ability to reacall and resent all parameters to poly~ when needed. ( e.g. when changing number of voices )

However, it simply does not work. There seems to be a conflict between inital state of parameters, pattr,... what ever is recalled first when loading or something like this..... really frustrating. it keeps me from building instruments in M4L so far.

Rob

monolake
Posts: 119
Joined: Sun Mar 09, 2003 9:42 am
Location: Berlin
Contact:

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by monolake » Fri Oct 30, 2009 12:01 pm

oh, i just tested with the latest build and it seems to work better- there is hope :-)

matcham
Posts: 29
Joined: Fri Mar 06, 2009 1:35 pm

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by matcham » Fri Oct 30, 2009 1:52 pm

:arrow: monolake : "test_buffer_inst_03" is missing in your device...

(by the way : does a frozen device is supposed to encapsulate poly~ original patch ?...)

M
________________
Mathieu Chamagne
http://mathieuchamagne.com

hoffman2k
Posts: 14718
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: Pattr, Pattrstorage and Parameter Mode Enable

Post by hoffman2k » Fri Oct 30, 2009 4:27 pm

Its a known bug apparently.
pukunui wrote:Currently you need to uncheck then check "Initial Enable" any time you make changes or pattrstorage won't store state properly. We're working on a better way of doing this right now, please stay tuned.

-A

Post Reply