ParamXFade:
Filter:
adclib/Classes (extension) | Control

ParamXFade
ExtensionExtension

crossfade between parameter settings

Description

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:

Class Methods

.new

create a new ParamXFade for ...

Arguments:

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:

.getSetDict

a dictinonary of getFuncs and setFuncs. currently only \uni (as used by Tdef, Ndef, Pdef), others to follow.

Instance Methods

.obj

the object whose params will be faded

.fadeTime

get and set fadeTime for the fading task

.dt

get and set timestep for the fading task

.dest

get and set destination for the fade; can be set while crossfading.

.fadeTo

set destination and optionally fadeTime, start fading task

internal fade variables

.destNames

the param names in the current destination

.destVals

the param values in the current destination

.currVals

the current param values the object is set to

.remainTime

the remaining time to crossfade

.fadeIndex

the index from 1.0 to 0.0 how far the crossfade has progressed

internal variables

.task

the task that does the crossfade

.getSetType

the type of get and set functions used

.getFunc

.setFunc

the get and set functions used

.startFunc

.endFunc

functions to run when crossfade task starts and ends

Examples