ixfx
    Preparing search index...

    Module @ixfx/modulation - v0.46.0

    Functions for modulating values.

    Examples for importing:

    import { Modulation } from "https://unpkg.com/@ixfx/bundle"
    import { jitter } from "https://unpkg.com/@ixfx/modulation/bundle"

    import * as Modulation from "@ixfx/modulation.js"
    import { jitter } from "@ixfx/modulation.js"

    Namespaces

    Easings
    Envelopes
    Forces
    Oscillators
    Sources

    Functions

    arcShape

    A series of arcs, sort of like a bouncing ball.

    crossfade

    Returns a 'crossfader` function of two easing functions, synchronised with the progress through the easing.

    cubicBezierShape

    Creates an easing function using a simple cubic bezier defined by two points.

    drift

    WIP Returns a Drifter that moves a value over time.

    gaussian

    Returns a roughly gaussian easing function

    interpolate

    Interpolates between a and b by amount. Aka lerp.

    interpolateAngle

    Interpolate between angles a and b by amount. Angles are in radians.

    interpolatorInterval

    Interpolates between A->B over duration. Given the same A & B values, steps will be larger if it's a longer duration, and shorter if it's a smaller duration.

    interpolatorStepped

    Returns a function that interpolates from A to B.

    jitter

    Jitters value by the absolute jitter amount. Returns a function.

    jitterAbsolute

    Returns a Jitterer that works with absolute values, ie. values outside of 0..1 range.

    mix

    Mixes in modulation. This is used when you want to fold in a controllable amount of modulation.

    mixModulators

    Returns a modulator that mixes between two modulation functions. Both modulators are given the same input value.

    pingPong

    Ping-pongs continually back and forth a lower and upper value (both inclusive) by a given interval. Use pingPongPercent for 0-1 ping-ponging

    pingPongPercent

    Continually loops up and down between 0 and 1 by a specified interval. Looping returns start value, and is inclusive of 0 and 1.

    sineBipolarShape
    sineShape

    Returns a function that shapes a 0..1 value as a sine waveform. An input value of 0 will be the very beginning of the wave cycle, input of 1 will be the end, 0.5 will be them middle and so on.

    spring

    Produces values according to rough spring physics. å

    import { continuously } from "@ixfx/flow.js"
    import { spring } from
    springShape

    Spring-dynamics modulator. To have spring driven by time or ticks, use spring or springValue. This is a lower-level function.

    springValue

    The same as spring but instead of a generator we get a value. When the spring is done, 1 is returned instead of undefined.

    squareShape

    Returns a function that shapes a 0..1 value as a square waveform.

    tickModulator

    Creates an modulator based on ticks.

    ticks

    Produce modulate values with each invocation. When the time is complete, the final value continues to return. Timer starts when return function is first invoked.

    time

    Produce values over time. When the modulate function is complete, the final value continues to return. Timer starts when return function is first invoked.

    timeModulator

    Creates an modulator based on clock time. Time starts being counted when modulate function is created.

    timingSourceFactory

    A factory function for creating a timing source. It returns a function which creates a designated timer.

    triangleShape

    Returns a function that shapes a 0..1 value as a triangle waveform.

    wave

    Creates a wave modulator by name.

    waveFromSource

    Returns a wave-shaping modulator with a source and shaper as input.

    weighted

    Returns a random number, 0..1, weighted by a given easing function. Default easing is quadIn, which skews towards zero.

    weightedAverage

    Weighted average

    weightedSource

    Returns a random number, 0..1, weighted by a given easing function. Default easing is quadIn, which skews towards zero. Use weighted to get a value directly.

    Type Aliases

    Drifter
    EasingName

    Easing name

    EasingOptions
    EasingTickOptions
    EasingTimeOptions
    InterpolateOptions

    Interpolation options.

    Jitterer
    JitterOpts
    ModFunction

    A function that modulates v.

    ModSettable
    ModSettableFeedback
    ModSettableOptions
    ModSource

    A mod source returns numbers on a 0..1 scale. Usually invoked just a function, some sources also support 'feedback' allowing source to be adjusted dynamically.

    ModulatorTimed
    SpringOptions
    TimingSourceFactory
    TimingSources
    Waveforms
    WaveModulator

    Function that modulates a wave

    WaveOptions

    Options for the wave function. Defaults to a sine wave of one cycle per-second.

    WaveShaperFeedback

    Wave shaper feedback. Feedback allows you to dynamically control tempo for advanced uses.

    WeightedOptions

    Options for producing weighted distribution

    Variables

    noop

    A 'no-op' function. Returns the input value without modification. Useful for when some default is needed