openmixer — generated API reference
    Preparing search index...

    Function makeSource

    • Build a Source with neutral preamp defaults (normal gain, pad/phantom off) for a given id + patch. Optional overrides set the name/icon/head-amp. Trim and polarity are NOT here — they are channel-owned (2026-07-30), so a fresh channel seeds them itself, never through the shared physical-input record.

      GAIN seeds from THE CAPABILITY IT IS HANDED, through gainDefaultOf — a REAC preamp at the +32 dB the box provably arms on grant, a channel with no preamp at unity. Until the ruling of 2026-09-07 this was DEFAULT_HEAD_AMP_GAIN_DB unconditionally, so every source this function ever built started at a Roland box's committing gain, capability or no capability: measured on the live console, inputs 3 and 4 held +32 dB of the DESK's own digital stage with no preamp behind either, which moves that strip's full-scale over to −32.0 dBFS (an internal spec §6's first open item).

      On a preamp the seed matches what the hardware provably sits at, so the UI and the box agree from the first frame; it is display-only and never written to a box (D1). An explicit init.gainDb — a restore, a determination, an operator's value — always wins: a default is what answers when nothing else does.

      Parameters

      • id: string

        the source id

      • patch: SourcePatch

        the physical patch (adapter + input)

      • init: Partial<
            Pick<Source, "name" | "icon" | "gainDb" | "pad" | "phantom" | "headAmp">,
        > = {}

        optional name / icon / head-amp overrides

      Returns Source

      a fresh source