ParamXFade:
Filter:
Classes (extension) | Control

ParamXFade : Object
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

ParamXFade.new(obj, fadeTime: 5, dt, getSetType: 'uni')

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:

ParamXFade.getSetDict

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

Inherited class methods

Instance Methods

.obj

the object whose params will be faded

.fadeTime

.fadeTime = value

get and set fadeTime for the fading task

.dt

.dt = value

get and set timestep for the fading task

.dest

.dest = indest

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

.fadeTo(indest, time)

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

.getSetType = value

the type of get and set functions used

.getFunc

.getFunc = value

.setFunc

.setFunc = value

the get and set functions used

.startFunc

.startFunc = value

.endFunc

.endFunc = value

functions to run when crossfade task starts and ends

Inherited instance methods

Examples