/ music / double-pendulum
Sign in
music / double-pendulum
double-pendulum / src / compositions / c01-poincare / layout.ts
22 lines · 690 BBlameHistoryRaw
1import type { Params } from "../../core/params.ts";
2import { soundOf } from "../../instruments/sounds.ts";
3import type { Layout } from "../../stream/layout.ts";
5/** One stem: the crossing notes. */
6export const NOTES = 0;
8export function layout(P: Params): Layout {
9 const notes = soundOf(P.noteInstrument as string, P.modalCustom as string);
10 return {
11 stems: [
12 { kind: "synth", sound: notes, output: NOTES },
13 ],
14 outputs: [
15 { effects: "own", sound: notes, level: (Q) => Q.notesLevel as number },
16 ],
17 };
20export function estimateLength(P: Params): number {
21 return (P.duration as number) + 0.5 + (P.finalHold as number) + (P.finalFade as number) + 0.3;
↑↓ move↵openescclose