openmixer — generated API reference
    Preparing search index...

    Class InputPatchbay

    The stateful input patchbay: channel → its single physical input, and physical input → its head-amp home. Both maps are keyed by identity (channelKey / physicalInputKey) so a split (two channels, one port) shares one Source. See the module header for the two rules it enforces.

    Index
    • The channels that source a given physical input — the split set, in bind order. More than one means several channels share this one preamp; empty means nothing sources it.

      Parameters

      Returns ChannelId[]

    • The head-amp of the input a channel sources, or undefined when the channel is unpatched.

      Parameters

      Returns HeadAmp | undefined

    • The head-amp of a physical input directly (by port identity), or undefined if unknown.

      Parameters

      Returns HeadAmp | undefined

    • The physical input a channel currently sources (its head-amp owner), or undefined when unpatched.

      Parameters

      Returns Source | undefined

    • The whole record a port holds — values, patch and declared capability — for a caller that has a PORT and no channel to ask through (a stagebox's arrival driving its own preamps). undefined when no channel and no seed has ever registered the port.

      The LIVE record, not a copy, exactly as patchChannel hands one back: whoever drives it must snapshot before it crosses to a backend, or a concurrent edit moves the pad under a SENS byte already encoded against it.

      Parameters

      • port: string

      Returns Source | undefined

    • Patch channel to the physical input patch — REPLACE semantics for the channel's ONE physical input (re-patching MOVES the channel; it never sums). If the input is already known — another channel splits it — its existing head-amp record is REUSED (the split shares the preamp) and init is IGNORED, so joining a split never resets the shared phantom / SENS. Returns the (possibly shared) input.

      Parameters

      Returns Source

    • Write the head-amp record for a PORT that has none — independent of any channel, so a box's preamps can be determined before an operator has patched anything to them (spec §8). A SEED, never an assertion: it REFUSES a port that already carries a record and answers false, touching nothing, because a box re-appearing must never lose the operator's parked values to a policy guess. The record it writes is what a later patchChannel to this port inherits, exactly as a split inherits a record another channel created.

      capability is what the PORT declares, and it is required rather than optional: a record carrying none reads as NO_HEAD_AMP, and a projection of such a record is refused as "declares no analog head-amp — state only". A determination that cannot be driven is a number in a map, and §8 is a safety rule about metal before it is a display rule.

      Parameters

      Returns boolean

    • The preamp's GAIN (dB) on the channel's physical input (shared across a split). Throws if unpatched.

      Parameters

      Returns void

    • Overwrite (or create) a port's head-amp record directly, independent of any channel — the session-RESTORE door (spec §6c: "the kept value has one store, and it is the session file"). Unlike seedHeadAmpForPort this never refuses: a saved show's values carry the SAME authority as an operator's own write, and overwriting is the point — restoring a session replaces whatever the desk currently holds for that port, exactly as restoring a channel's PATCH replaces whatever it sourced before.

      Parameters

      Returns Source

    • −20 dB analog pad on the channel's physical input (shared across a split). Throws if unpatched.

      Parameters

      Returns void

    • +48 V phantom on the channel's physical input (shared across a split). Throws if unpatched.

      Parameters

      Returns void

    • Drop a channel's binding. The physical input's head-amp record is released only once no channel still splits it — a surviving split keeps the shared preamp alive.

      Parameters

      Returns void