Forums > MaxMSP

pattr feature idea: initial value attribute

May 15, 2008 | 4:11 am

pattr’s @autorestore feature is nice in some situations, but often times I need a specific initial value when the patch opens. The pattr value changes when I’m working on the patch and I don’t want some arbitrary value to autorestore.

So I use:
[loadmess initial_value] -> [pattr @name myvar @autorestore 0]

I seem to have initialization problems that occur in very large patches, so I sometimes need to use:
[loadmess initial_value] -> [deferlow] -> [pattr @name myvar @autorestore 0]

When there are a lot of pattrs this gets tiresome. I wish I could do this:

[pattr @name myvar @value initial_value]


June 9, 2008 | 2:21 pm

I like this idea. So much, in fact, that the @initial attribute has been added to the next version of pattr. There will also be an ‘init’ message, which you can use to reset the pattr to the initial value at any time.

@initial will override any value saved with the patch (in fact, if @initial is set, the value isn’t saved with the patch).

Enjoy it when you get it!
Jeremy


June 10, 2008 | 2:54 am

Quote: Jeremy Bernstein wrote on Mon, 09 June 2008 07:21
—————————————————-
> I like this idea. So much, in fact, that the @initial attribute has been added to the next version of pattr. There will also be an ‘init’ message, which you can use to reset the pattr to the initial value at any time.
>
> @initial will override any value saved with the patch (in fact, if @initial is set, the value isn’t saved with the patch).
>
> Enjoy it when you get it!
> Jeremy
>
>
—————————————————-

Sounds great. I will definitely enjoy and get a lot of use out of this feature.

Thanks!


Viewing 3 posts - 1 through 3 (of 3 total)