# loudness governs how perceptual loudness is distributed across time and voices. ensures dynamic balance, prevents overload, and provides a structured, deterministic way to sculpt volume at global, voice, and sectional levels. ## overview * `0` absolute envelope * description: master loudness contour over time * real-world analogy: fade-ins, long crescendos, global swells * notes: defines a ceiling; all events are scaled proportionally to fit * `1` per-voice envelope * description: loudness shaping per voice over time * real-world analogy: lead/support balance, instrument emphasis * notes: defines a weight profile for each voice across the timeline * `2` region emphasis * description: time-local loudness emphasis based on structural divisions * real-world analogy: chorus/verse contrast, form-driven dynamics * notes: used in tandem with `segmentation` and/or `hierarchy` ## parameter behavior summary * `0` absolute envelope * `a`: curvature of rise/fall (0 = linear, 1 = slow-attack sharp-release) * `b`: peak time (0 = early, 1 = late) * `1` per-voice envelope * `a`: contrast between lead and background voices * `b`: voice-role skew over time (0 = fixed, 1 = rotating) * `2` region emphasis * `a`: inter-region loudness contrast * `b`: transition smoothness between regions all parameters are in `[0, 1]`. ## composition model the forms are multiplicative and together produce the final per-event amplitude scaler: ``` loudness(t, v) = absolute_envelope(t) * per_voice_weight(t, v) * region_emphasis(t) ``` each factor is precomputed, bounded in `[0, 1]`, and strictly static - ensuring deterministic loudness for all events at all times. flat settings disable the corresponding effect (e.g. all-ones `absolute_envelope` gives full dynamic headroom). ## why these were chosen * `absolute` enables timeline-wide energy control * `per-voice` balances instruments or layers over time * `region` allows macrostructure shaping through contrast and phrasing these map directly to musical concepts (crescendo, voice lead, chorus lift) and align with a fully precomputed additive engine. ## what's not included * runtime dynamics (compression, ducking, sidechain) * perceptual normalization or loudness metering * adaptive gain compensation or feedback-driven adjustment such features would introduce non-determinism and are intentionally excluded. for expressive shifts, modulation or `mutation` domains can introduce controlled variation upstream. ## conclusion the `loudness` domain provides compact, composable control over the perceived amplitude of sound events, while respecting a strict upper bound. it supports: * global dynamics * inter-voice balance * structure-aligned phrasing and integrates transparently with envelope and spectral shaping domains. by ensuring no overlapping events exceed the available dynamic budget, it preserves clarity, precision, and headroom at all scales.