Skip to content

Modulation

The Modulation package contains functions and sub-modules for modulating values. That is, for some input value, to shift it in some way. It is a useful technique for adding temporality. These functions can be combined in interesting ways for rich behaviour.

For example, you might use an oscillator to produce a gentle up-and-down wave, and then apply some jitter for a bit of randomness. Or maybe you trigger an envelope which produces values over time. This value could then be used to interpolate from one colour to another.

ModuleDescription
EasingsTransition between 0..1 non-linearly
EnvelopesShape a value over time
ForcesSimulate natural forces
InterpolationInterpolate between values
JitterJitter a value
OscillatorsWaveforms
SpringsSprings
// Whole module
import * as Modulation from "@ixfx/modulation"
// Single function
import { jitter } from "@ixfx/modulation"
// One of several modules
import { Modulation, Flow, Data } from "@ixfx"
// And within your HTML's <HEAD> </HEAD> block:
<script type="importmap">{ "imports": { "@ixfx":"/ixfx/index.js", "@ixfx/": "/ixfx/" } }</script>