Forums > MaxMSP

pattrstorage: how to change the way of interpolation for ALL pattrs

June 6, 2014 | 1:18 am

Hi all,

I’m trying to change the way of interpolation of ALL the saved pattrs. I get how I can use a table or exponential function for just ONE of the related pattrs, but I want to change it for ALL of them. Is there a way of doing this?

Thanks in advance!


June 6, 2014 | 5:44 am

Create a patcher.
Add a couple of number boxes toggles etc.
Create a pattrstorage.
Create a autopattr.
Create a preset object
Make sure all 3 have the same name. eg. autopattr test-unit (in preset go to scripting name)
Give all your number toggle boxes a "scripting name" (in inspector)
Now you can send a float box to pattrstorage eg 1.5 and this will interpolate between preset 1 and preset 2 with 50%


June 6, 2014 | 5:45 am

By putting everything in a patcher autopattr reads everything with a scripting name this means you don’t need to use the pattr object at all.


June 6, 2014 | 5:47 am

Hi Andro, thanks, but that’s not what I mean. I’m looking to change the WAY of interpolation from linear to exponential or table, for ALL objects in pattrstorage in one go. In my patch they’re created dynamically in subpatches. Because of this I need to go into pattrstorage and change them all. This is not what I want.


June 6, 2014 | 6:10 am

Found it !!

http://www.zacharyseldess.com/z.abstractions.html

search for Z.scale and your off !


June 6, 2014 | 6:20 am

Hi Andro, I get the way you’d do it, but I’d want to set ALL the different pattrs in pattrstorage to one particular mode of interpolation.
Using your way, I’d need to have an z.scale object underneath each pattr, while pattrstorage can have different interpolation modes…


June 6, 2014 | 10:11 am

Then I’m at a loss at how to help out. Is it a problem using an instance of Z.scale with each pattr object ??


June 6, 2014 | 10:54 am

I could, yes. But then it’d use a lot more processing power. It’s a function which is built in to pattrstorage, but I just need to access all of it at once. Thanks for your suggestions anyway, Andro! :)


June 6, 2014 | 11:15 am

There appears to be no (obvious) way to do what you want via pattrstorage however you can set the default_interp attribute when instantiating the pattrs – pretty much the same result if you don’t need to change modes later.


June 6, 2014 | 11:22 am

Thanks Spectro!


June 6, 2014 | 11:53 am

With that said, i don’t seem to be able to get it to work here. The modified attribute appears set in patter inspector but pattrstorage doesn’t see it…


June 9, 2014 | 12:53 am

Hi Spectro, Indeed, also can’t get it to work… possible bug?


June 9, 2014 | 3:39 am

i’m guessing default_interp would only work for parameters that haven’t been registered yet ?


June 9, 2014 | 3:41 am

This does appear to be a bug (in 6.1.5 at least). In Max5 it works – provided the object is created with the @default_interp attribute provided as an argument – it still doesn’t appear to be possible to change interpolation mode after the fact however…


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