ParamXFade can crossfade a set of parameters of a process (e.g. an Ndef or a Tdef) from their current values to a destination over a fadeTime.
This is useful for morphing between presets flexibly.
First code example:
create a new ParamXFade for ...
obj |
a specific object |
fadeTime |
optional - initial time to crossfade |
dt |
optional initial timestep |
getSetType |
select which methods to use for getting/setting: default value \uni uses methods given in getSetDict: |
a dictinonary of getFuncs and setFuncs. currently only \uni (as used by Tdef, Ndef, Pdef), others to follow.
the object whose params will be faded
get and set fadeTime for the fading task
get and set timestep for the fading task
get and set destination for the fade; can be set while crossfading.
set destination and optionally fadeTime, start fading task
the param names in the current destination
the param values in the current destination
the current param values the object is set to
the remaining time to crossfade
the index from 1.0 to 0.0 how far the crossfade has progressed
the task that does the crossfade
the type of get and set functions used
the get and set functions used
functions to run when crossfade task starts and ends