openmixer — generated API reference
    Preparing search index...

    Function normalizeChain

    • Enforce the chain's structural invariants — the G-EQ discipline (task #101) plus the structural fader — returning a NEW normalized chain (pure; input untouched):

      • Exactly one eq node. Duplicate EQ nodes collapse to the first; a missing EQ is re-inserted (bare, enabled) at its canonical position. The EQ may be disabled (enabled:false) and reordered, but it can never be removed — matching the native mixer's always-allocated EQ slot. A disabled EQ still counts as present.
      • A structural fader on input (non-bus) strips: a channel always has a fader node, re-inserted at its canonical position if absent. Bus masters carry no fader (their gain is the scalar bus-master), so this is skipped for bus kinds.

      Every mutation path (reorder, chain-block apply, snapshot load, AI-authored definition) funnels through this so "the native EQ is always present" is a checked property of the data model, not an accident of seeding.

      Parameters

      • chain: readonly Processor[]

        the (possibly hand-/AI-authored, possibly reordered) processor list

      • kind:
            | "input"
            | "fxReturn"
            | "aux"
            | "mix"
            | "matrix"
            | "cue"
            | "main"
            | "fxSend"
            | "dca"
            | "muteGroup"
            | "mixMinus"

        the strip's ChannelKind — decides the seed order + fader presence

      • set: TapPointSet = DEFAULT_TAP_POINTS

      Returns Processor[]

      a fresh normalized chain satisfying the invariants