openmixer — generated API reference
    Preparing search index...

    Function planStereoSourcePatch

    • Patchbay stereo-source split — the mapping for a stereo (2-port) source patched onto the mixer. DEFAULT (asStereoChannel omitted/false): a genuine stereo source (both endpoint.l AND endpoint.r present) SPLITS across TWO CONSECUTIVE MONO channels — channel (same kind, same index) takes the L leg, the NEXT channel (same kind, index + 1) takes the R leg — so the operator gets two independently pannable mono strips and neither leg is ever silently dropped. Pass asStereoChannel: true to instead keep BOTH legs on the ONE channel as a single stereo pair (what StructuralDspController.assignSource already does for any endpoint it is given — a native mixer group then sizes that one channel as a 2-wide strip per its declared import('@freemixer/core').ChannelWidth). A MONO source (endpoint.r undefined) always yields the one op, regardless of the flag — there is nothing to split.

      Pure + synchronous (no engine access) so the mapping is unit-tested in isolation; see StructuralDspController.assignStereoSource for the verb that applies it live.

      Parameters

      • channel: ChannelId

        the target channel — the split's L half (or the sole channel when folded)

      • endpoint: StereoEndpoint

        the source endpoint; r present marks it a stereo (2-port) source

      • asStereoChannel: boolean = false

        fold both legs onto the one channel instead of splitting (default false)

      Returns StereoSourcePatchOp[]

      the channel(s) to patch, in L-then-R order — one entry (mono, or folded stereo), or two (the default stereo split)