// How a composition's performance is laid out: its stems (each rendered by one producer) and the // outputs they play on (each with its effects and live level on the page). Worker-safe: the score // uses the same layout to know its stem numbers. import type { Params as SynthParams } from "@modal-synth/engine/params.ts"; import type { Params } from "../core/params.ts"; export interface StemSpec { /** "synth": a modal-synth instrument in its own worker, played by the score's notes; * "score": audio the score renders itself (e.g. the ensemble's pendulums) */ kind: "synth" | "score"; sound?: SynthParams; output: number; } export interface OutputSpec { /** * "own": the sound's own modal-synth effects (saturation, delay, reverb); * "shared": dry at the sound's volume plus a send to the piece's one shared reverb; * "none": dry (at the sound's volume, if it has one) */ effects: "own" | "shared" | "none"; sound?: SynthParams; /** dB, read live */ level: (P: Params) => number; /** −1..1, read live */ pan?: (P: Params) => number; } export interface Layout { stems: StemSpec[]; outputs: OutputSpec[]; /** T60 of the shared reverb (outputs with effects "shared") */ reverbTime?: number; }