feat: daybreak finale turns the contact arrival into a sunrise with a dawn chord

This commit is contained in:
2026-10-11 05:32:08 +03:00
parent c9e6ac0f29
commit b6e22a1299
37 changed files with 756 additions and 44 deletions

View File

@@ -27,6 +27,8 @@ export interface AdaptiveMixer {
readonly bedInput: GainNode;
readonly driveLiftInput: GainNode;
readonly driveTextureInput: GainNode;
/** END OF SHIFT: the dawn chord, summed after the mood controls. */
readonly dawnInput: GainNode;
setChapterIntent(intent: ChapterIntent): void;
setDriveEnergy(sample: DriveEnergySample): void;
setTransportAnchor(anchorTime: number | null): void;
@@ -57,6 +59,9 @@ export const createAdaptiveMixer: AdaptiveMixerFactory = (context, destination)
const driveTextureInput = context.createGain();
const textureSend = context.createGain();
const sum = context.createGain();
// The dawn chord joins the sum directly: the output gain (mute, volume) and
// the pulse tap govern it, and the chapter moods leave it alone.
const dawnInput = context.createGain();
const highShelf = context.createBiquadFilter();
const initialProfile = MIX_PROFILES.open;
@@ -77,6 +82,7 @@ export const createAdaptiveMixer: AdaptiveMixerFactory = (context, destination)
driveLiftCap.connect(sum);
driveTextureInput.connect(textureSend);
textureSend.connect(sum);
dawnInput.connect(sum);
sum.connect(destination);
const ownedNodes: readonly AudioNode[] = [
@@ -88,6 +94,7 @@ export const createAdaptiveMixer: AdaptiveMixerFactory = (context, destination)
driveLiftCap,
driveTextureInput,
textureSend,
dawnInput,
sum,
];
let transportAnchor: number | null = null;
@@ -197,6 +204,7 @@ export const createAdaptiveMixer: AdaptiveMixerFactory = (context, destination)
bedInput,
driveLiftInput,
driveTextureInput,
dawnInput,
setChapterIntent(intent) {
if (disposed) return;
const profile = MIX_PROFILES[intent.mood];