pattrstorage: how to change the way of interpolation for ALL pattrs
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!
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%
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.
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.
search for Z.scale and your off !
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...
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 ??
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! :)
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.
Thanks Spectro!
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...
Hi Spectro, Indeed, also can't get it to work... possible bug?
i'm guessing default_interp would only work for parameters that haven't been registered yet ?
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...
Very old message, but the forum search got me here when I was trying to change all interpolation modes at once. Thought I'd post my solution for the next person:
Hello, another solution.
