This isn’t too big of a deal to adapt/extend, but PdefPreset (from the JITlib extension quark) only does morphing (and xfading) between a pair of [pre]settings, even though it can store more than two such settings sets.
I was wondering if someone hasn’t already implemented an Env-like present morphing, i.e. a multi-segment PdefPreset “morph”, preferably one that is known to work with Pdef.envir, although one for plain Environments would be useful to to me as well.
I see a limitation in Pxfade that it seems to assume “equally spaced” time points; I see there’s Pseg in the standard library (which allows any spacing of the time points), but it doesn’t really do “keyframe interpolation” (as interpolating/morphing between different presets/envirs might be called in a graphics context) but Pseg only interpolates between single numerical values or apparently arrays too. I suppose one can do a envir conversion to/from arrays, but it would be rather annoying.
I see there’s mmPresetInterpolator too
It looks like it has all the bells and whistles one could possibly want… except a notion of interpolating over time So yeah, it’s more of a Pxfade alternative.
Fairly off-topic aside: interesting paper on interpolating drum beat patterns, although not done in SC.
It doesn’t assume equally spaced points in time - it doesn’t have any notion of time at all, that’s the responsibility of the caller. It simply takes an xfade parameter and interpolates between N event streams based on this parameter (plus a function that tells it how to interpolate). You can drive the xfade parameter with a Pseg if you want interpolation over time - or drive it with a knob, a server bus value, a pattern, etc.
That’s a good point. One can turn any interpolator into an Env-style interpolator that way.
I’m having a bit of trouble with Pxfade expecting isSymbol to be defined seemingly for a lot of things. I guess it’s defined in some other quark/extension of yours. It seems to work with the obvious thing for that