Example for using preset with pattrstorage?

Jul 31, 2008 at 4:47pm

Example for using preset with pattrstorage?

Is there anywhere an example how to use [preset] together with [pattrstorage]? The reference says it is possible but not how.

#39081
Jul 31, 2008 at 5:10pm

Preset can be used as a UI for pattrstorage by pointing the preset object to the pattrstorage via the preset object’s inspector.

– Pasted Max Patch, click to expand. –
#137101
Jul 31, 2008 at 6:05pm

Thanks, got it.
To be exact: I don’t understand the whole construct yet but can use it right now ;-)

Quote: Chris Muir wrote on Thu, 31 July 2008 19:10
—————————————————-
> Preset can be used as a UI for pattrstorage

Yes this is what I do. I love the [preset] but it doesn’t provide good data management. The combination with [pattrstorage] looks good.

#137102
Aug 1, 2008 at 11:05am

Quote: Peter Ostry wrote on Thu, 31 July 2008 20:05
—————————————————-
> … I don’t understand the whole construct yet but can use it right now ;-)
—————————————————-

No I can’t. Obviously I am too dumb for [pattrstorage]. Chris, how can I read the stored values of [pattrstorage] in your example patch above?

I think I have tried everthing on inputs and outputs of pattrstorage and autopattr, looked at the help files, read the reference pages of both three times but I am not able to get the stored values out. I can see the values in the window but the outputs shows only recall 1, recall 2, etc. No values. Btw, in the helpfile [pattrstorage] sends also only recall 1, recall 2, …

What is the secret?

If it is not possible to read values from [pattrstorage] I would have to bang all my interface objects. Of course an option but I cannot believe that it is necessary.

#137103
Aug 1, 2008 at 3:22pm

On Aug 1, 2008, at 4:05 AM, Peter Ostry wrote:

> how can I read the stored values of [pattrstorage] in your example
> patch above?

I’m not sure that I understand the question. Read them for what reason?

Any object that is part of a pattrstorage preset will get its value
restored when the preset is recalled. You don’t have to do anything to
read it. The pattr system takes care of setting all the objects that
it knows about.

I have an example, called PattrKitty, on my examples page: http://www.xfade.com/max/examples/
This example sets up a simple storage system (although this one
doesn’t use the preset object in its UI). Maybe looking at that
example would help?

-C

Chris Muir
cbm@well.com

http://www.xfade.com

#137104
Aug 1, 2008 at 4:40pm

Quote: Chris Muir wrote on Fri, 01 August 2008 17:22
—————————————————-
> > On Aug 1, 2008, at 4:05 AM, Peter Ostry wrote:
>
> > how can I read the stored values of [pattrstorage] in your example
> > patch above?
>
> I’m not sure that I understand the question. Read them for what reason?
> Any object that is part of a pattrstorage preset will get its value
> restored when the preset is recalled. You don’t have to do anything to
> read it.

The user makes his settings with a lot of interface objects. Among them are three 4×32 matrix objects. Everything is stored in a 128 knob preset. When a preset gets recalled I need all data from all objects at once and in a certain order for further processing in the next stage. With all data I mean also the empty cells of the matrix instances.

Here is one page of the user interface which might explain were my words fail:

http://img.skitch.com/20080801-j66g3tpacrsn828r2fdnkbq38k.jpg

Instead of collecting the values of the interface elements individually I thought it would be more elegant to get them with a kind of dump message from pattrstorage. This is obviously not the way pattrstorage works.

> I have an example, called PattrKitty, on my examples page: http://www.xfade.com/max/examples/

Oh yes, I started with PattrKitty as I began to explore Max. Then I switched to [preset] because it supplies an interface which is very good for this project. Was the switch a bad idea and why?

#137105
Aug 1, 2008 at 7:21pm

On Aug 1, 2008, at 9:40 AM, Peter Ostry wrote:

> The user makes his settings with a lot of interface objects. Among
> them are three 4×32 matrix objects. Everything is stored in a 128
> knob preset. When a preset gets recalled I need all data from all
> objects at once and in a certain order for further processing in the
> next stage. With all data I mean also the empty cells of the matrix
> instances.

I’m afraid I’m still not seeing the problem. Here’s an example of
abusing a matrixctrl to act as a dot matrix for displaying a message:

http://www.xfade.com/max/examples/PattrScroll.zip

Note that the order can be controlled with priority messages to
pattrstorage.

Maybe you should upload a subsection of your patch that better
illustrates your problem?

-C

>

Chris Muir
cbm@well.com

http://www.xfade.com

#137106
Aug 1, 2008 at 11:53pm

Oh no, our thoughts ran apart. A sample patch does not help, you’ll see the same as in the screenshot. I have no problem using the matrix itself.

Let me leave out the details and break the question down to the basic issue:

Imagine a [preset] and 128 number boxes. The user clicks on preset knob #3 and the number fields get their values. Fine. But now I want ALL values of ALL number fields to go to a single outlet. And everytime in the same order. This is what the example patch below explains, visually.

I don’t care if I need an additional storage object if it gives me the opportunity to get a dump of all values of preset #3. I would just prefer not to cable every single interface element to the same outlet. I would like to send a message to a storage object and get the whole stream from it.

I *assumed* that [pattrstorage] can give me a dump but I was wrong.

Hope that clears the situation, here is the picture of what I tried to say above:

– Pasted Max Patch, click to expand. –
#137107
Aug 2, 2008 at 12:40am

Peter Ostry wrote:
> Imagine a [preset] and 128 number boxes. The user clicks on preset knob #3 and the number fields get their values. Fine. But now I want ALL values of ALL number fields to go to a single outlet. And everytime in the same order. This is what the example patch below explains, visually.
>
> I don’t care if I need an additional storage object if it gives me the opportunity to get a dump of all values of preset #3. I would just prefer not to cable every single interface element to the same outlet. I would like to send a message to a storage object and get the whole stream from it.
>
> I *assumed* that [pattrstorage] can give me a dump but I was wrong.
>

No you were not:

– Pasted Max Patch, click to expand. –

Ciao

#137108
Aug 2, 2008 at 1:32am

Quote: gusanomaxlist wrote on Sat, 02 August 2008 02:40
—————————————————-
> Peter Ostry wrote:
> >…
> > I *assumed* that [pattrstorage] can give me a dump but I was wrong.
>
> No you were not:
> …
—————————————————-

BIG SMILE :-)
Thank you!

This is basically the same as Chris sent me, I was just not able to adjust the settings of the pattrstorage for my needs. It handles all interface elements I need, the only exception is the matrix. But I can get the data from the matrix itself.

Great!

#137109
Aug 2, 2008 at 8:29am

you can’t rely on pattrstorage to recall all the values for it’s clients in
the same order without setting priorities for the clients. you can set the
priority using the client window for pattrstorage, sending the priority
message to pattrstorage or giving each number box a pattr with
@default_priority.
By the way, there is a dump from pattrstorage, but I would think that this
also has an arbitrary order for outputing data.

If you’re looking for an interface to go with pattrstorage then have a look
at the p.storage abstraction:

http://www.pelado.co.uk/category/maxmspjitter/

pelado

On Sat, Aug 2, 2008 at 3:32 AM, Peter Ostry

wrote:

>
> Quote: gusanomaxlist wrote on Sat, 02 August 2008 02:40
> —————————————————-
> > Peter Ostry wrote:
> > >…
> > > I *assumed* that [pattrstorage] can give me a dump but I was wrong.
> >
> > No you were not:
> > …
> —————————————————-
>
> BIG SMILE :-)
> Thank you!
>
> This is basically the same as Chris sent me, I was just not able to adjust
> the settings of the pattrstorage for my needs. It handles all interface
> elements I need, the only exception is the matrix. But I can get the data
> from the matrix itself.
>
> Great!
>
>
> –
> Peter
>
>

http://www.pelado.co.uk

#137110
Aug 2, 2008 at 9:04am

and this one focusing on interpolation : http://pan-etc.net/res/dev/
Preset.zip

#137111

You must be logged in to reply to this topic.