Skip to content

Change Types

Elizabeth Hudnott edited this page Aug 12, 2019 · 7 revisions

Some parameters only support a limited selection of these change types, although many support all of them.

Synth.ChangeType.SET

The parameter will change instantaneously from its old value to its new value in a step like fashion.

Synth.ChangeType.LINEAR

The parameter will fade from its old value to its new value in a linear fashion. The change will be completed at the time specified in the call to setParameters. The change will begin as soon as all previous made changes to the same parameter have been completed.

Synth.ChangeType.MARK

The parameter's value won't change but the parameter will have a new event added to its timeline. This can be used to mark an explicit start time for later uses of Synth.ChangeType.LINEAR or Synth.ChangeType.EXPONENTIAL. Use the constant Synth.Change.MARK when you need to use this change type.

Synth.ChangeType.EXPONENTIAL

Similar to Synth.ChangeType.LINEAR but the parameter's value transitions continuously along an exponential curve.

Synth.ChangeType.DELTA

Similar to Synth.ChangeType.SET when used on its own but instead of setting the parameter to the value specified by the Change object this algorithm instead sets the parameter to the value obtained by adding together the parameter's current value with the value specified by the Change object.

Synth.ChangeType.MULTIPLY

Similar to Synth.ChangeType.DELTA but instead of addition this one multiplies the parameter's current value by the one specified in the Change object.

Synth.ChangeType.NONE

This describes a "change" that is not really a change at all but is actually an instruction to disregard some other change! It's used when a phrase wants to disregard a change described inside one of its nested phrases. See the sequencing page for more information about phrases. Use the constant Synth.Change.NONE when you need to use this change type.

Combinations

Synth.ChangeType.DELTA and Synth.ChangeType.MULTIPLY can be combined with Synth.ChangeType.LINEAR and Synth.ChangeType.EXPONENTIAL. For example, Synth.ChangeType.DELTA + Synth.ChangeType.LINEAR.