Ideas for Interpolatng vst~ presets?

Jacob Akerson's icon

Hello,
I wonder if someone could point me in the right direction. I'm trying to find a nice way of exposing the presets of a vst loaded into vst~ and then interpolating between the presets via a pattr. I know how to capture snapshots and send a float to pattr to interpolate but I'm confused as to the best way of exposing pattr to the presets that come with a given vst plugin. Thoughts and ideas are much appreciated. Thanks, Jacob

Jean-Francois Charles's icon

You have to do the interpolation in pattr world. If you want to interpolate with the "factory" or other "save-by-vst" presets, you'll have to retrieve the values of the parameters you want to interpolate for each "vst preset", and load that in, say, UI objects in Max ready for pattr. Save each of these "vst presets" as a "pattr preset". That process could be done as an initialization step.
Then, interpolate from pattr, and give the parameters to vst~ "as per usual".

As a proof of concept, build the system for a given VST, with a limited set of parameters.

Something to think about once your basic system works: I would certainly find a way to make sure the flow of data is not too high when you interpolate. Depending on your application, see if an update rate of, say, 70ms (or anything else) would make sense. You can set the grain of your line to that, or use a [speedlim @defer 1] object, etc. Test for your application, of course.

Jacob Akerson's icon

Thank you Jean, I thought that may be the case. It would be wonderful to have a way of automating the transfer of factory presets to pattr presets. Perhaps using Java Script to loop through all the presets and store the values in a json file and then somehow get the pattr to read the json file. (I have no idea how to do that though : ) Or, I guess I could could just click through the presets one by one and curate a nice library of presets 'by hand'. Although, slower that might give me a library of presets that I've already vetted. hmmm

Roman Thilenius's icon


the second part of what jfc wrote is quite important. there are a lot of synths which have 300 or more parameters and you have to carefully organize data handling when you want to interpolate between two complete patches. :)

what i would do different is that pattr thing. it seems easier to just get all the parameter data and write the values into a list or floats, do the same with another preset and then interpolate between these two lists in any way you like.

Jacob Akerson's icon

Thank you Roman, I see how that could really create a bottleneck if I'm not careful. I'm looking at a couple different ways of interpolating the data. I just got turned onto Nodes~ which like like it would work well for the task and I also saw a CNMAT object that interpolated between lists kind of like you suggested.
One thing I'm still uncertain about is getting all of the parameters values for each preset. I'm gonna do some experimenting tonight to see if I can figure it out.

Jacob Akerson's icon

I can see coll is going to be my friend as far as collecting preset data.