AutoMovie API
    Preparing search index...

    Function seededSmoothNoise

    • Smooth, seeded, band-limited variation over one window of an action, zero with zero first and second derivatives at both ends.

      The signal is a sum of terms sines whose frequencies (uniform in [0.3, 1] * maxFrequency hertz) and phases are drawn from the stream, each weighted 1 / sqrt(terms), the procedural-noise construction of Perlin and Goldberg's Improv (SIGGRAPH 1996) used for idle and path variation. It is multiplied by the window w(u) = (16 u^2 (1 - u)^2)^2, which is 1 at the middle and vanishes with its first three derivatives at u = 0 and u = 1, so variation added to a motion leaves its contacts, its cut points and its continuity untouched. The draws read stream indices 0 .. 2 terms - 1, so the same stream always yields the same signal.

      Parameters

      • random: IAutoMovieRandom

        The stream, keyed by the caller's stable ids.

      • u: number

        Normalized time within the window, in [0, 1]; outside is zero.

      • duration: number

        The window's length, seconds, which sets the frequencies' time scale.

      • maxFrequency: number

        The highest frequency, hertz; positive.

      • terms: number = 4

        Number of sines; 4 by default.

      Returns number

      The value, roughly in [-1, 1].