automix
Source: automix.js:17
Auto-mix gain math — the pure arithmetic behind the AUTO-MIX button.
Extracted from renderer.html's applyInitialGain() so it can be unit-tested in plain Node (test/automix.test.js) without a DOM. The renderer still owns all DOM reads/writes; this module owns only the numbers, so the two stay in lock-step by construction.
Loaded two ways (UMD-lite): the Electron renderer loads it with a plain script tag, which attaches window.AutoMix (no nodeIntegration needed; module is undefined there); Node tests require('../src/automix.js') and use module.exports.
Units: LUFS = integrated loudness; dBFS = sample peak; the dBTP target ceiling is -0.1. All gains are clamped to [-24, +6] dB to match the per-track trim slider range.