import type { Params } from "../../core/params.ts"; import { soundOf } from "../../instruments/sounds.ts"; import type { Layout } from "../../stream/layout.ts"; /** One stem: the crossing notes. */ export const NOTES = 0; export function layout(P: Params): Layout { const notes = soundOf(P.noteInstrument as string, P.modalCustom as string); return { stems: [ { kind: "synth", sound: notes, output: NOTES }, ], outputs: [ { effects: "own", sound: notes, level: (Q) => Q.notesLevel as number }, ], }; } export function estimateLength(P: Params): number { return (P.duration as number) + 0.5 + (P.finalHold as number) + (P.finalFade as number) + 0.3; }