Core · interface

TimeCurve

Explained in The loop.

interface TimeCurve
import type { TimeCurve } from '@driftengine/core';

Properties

NameTypeDescription
kindreadonlyTimeCurveKind
durationSecreadonlynumberLength of the segment on the clip's own clock, seconds.
amountreadonlynumberHow much of the segment the effect claims, 0–1.
More

hold: the fraction frozen. ramp: the depth of the rate swing. stutter: the frozen fraction of each step. reverse: the fraction run backwards. Zero makes every kind behave as linear, which is the honest neutral rather than a special case to branch on.

stepSecreadonlynumberstutter only: one freeze-and-catch-up cycle, seconds.
reversibleSecreadonlynumberreverse only: how far back the caller can actually go, in source seconds.
More

Running a re-simulated stream backwards is impossible without keeping the states to go back to, so the reversible window is a property of the consumer's buffer and has to be supplied rather than assumed. A curve never returns an offset below -reversibleSec; a consumer with no buffer passes zero and gets no reversal at all.