mickeyf.docs
    Preparing search index...

    Maps stabilized pitch to HSL color.

    This class is stateful:

    • It stores a “last good” color used during brief silence.
    • It can (optionally) randomize a new idle color after sustained silence.
    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    Methods

    • Computes the current pitch-driven color decision.

      Parameters

      Returns ColorDecision

      Heuristics (high level):

      • Silence holds the last color; after sustained silence, picks a new idle color from silenceRanges.
      • Pitch hue is anchored to the committed pitch class (pitchClassToHue).
      • Micro drift offsets hue by a bounded amount based on fractional semitone distance.
      • If noteStep is enabled, color updates only on commit events (result.changed).

      Determinism: given the same internal state and inputs, results are deterministic except when sustained silence triggers a random idle color.