openmixer — generated API reference
    Preparing search index...

    Interface LevelSeriesCodec

    A FieldCodec that also ENCODES — the wire is written by the desk and read by the client, and both halves live here so neither can drift from the declared quantum.

    interface LevelSeriesCodec {
        examples: { invalid: readonly unknown[]; valid: readonly unknown[] };
        limit: ControlLimit;
        values?: readonly (string | number)[];
        decode(raw: unknown): Decoded<readonly number[]>;
        encode(values: ArrayLike<number>): string;
    }

    Hierarchy (View Summary)

    Index
    examples: { invalid: readonly unknown[]; valid: readonly unknown[] }

    The travel this codec ENFORCES, for a numeric field — the same bounds decode clamps or refuses against, published so OPTIONS can answer them.

    Declared here rather than beside each field because the codec is where the numbers already are: a row that repeated them would be a second spelling of one fact, free to drift from the clamp that actually applies. Absent on codecs with no numeric travel (a bool, a text, an enum) and on the ones whose legal span is per-instance — a device travel is the other cardinality and comes from the field's own limit.

    values?: readonly (string | number)[]

    The closed VOCABULARY this codec enforces, for a field whose legal values are a discrete set rather than a span — published so OPTIONS can answer them, exactly as limit is.

    A travel and a vocabulary are the same question asked of two shapes of field: what may this hold. A span answers with min/max/step; a set answers by listing. Both belong to the CODEC, because the codec is what refuses — a row that restated either would be a second spelling free to drift from the check that actually applies.

    Absent on codecs whose domain is not enumerable (a number, a free token, a bool — a bool's two values are its TYPE, not a desk decision). A client renders the menu it is given and never one it composed: an option the desk would refuse must be unofferable, and an option the desk added must appear without shipping a new client.

    • dB values → the base64 series. Values clamp to the span; non-finite reads as min.

      Parameters

      • values: ArrayLike<number>

      Returns string