release / govulncheck (push) Successful in 17s
release / web (push) Successful in 1m33s
release / go (push) Successful in 1m49s
release / integration (push) Successful in 5m42s
release / android (push) Successful in 5m59s
release / Build signed APK (releases and dev) (push) Successful in 6m9s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 16s
release / Verify release artifacts (tag releases only) (push) Skipped
Applies rule 32's migration exception: each header still says what the schema was, what changes and what it prevents, but task, milestone, decision and rule ids are replaced by the practice they stood for, the operator quotes by the decision, single-install counts are dropped, and pointers to a deleted package and an external design doc are gone. golang-migrate keeps no checksum, so editing applied migrations' comments is safe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.6 KiB
SQL
31 lines
1.6 KiB
SQL
-- 0066_album_loudness.up.sql — album loudness for album-mode normalization.
|
|
--
|
|
-- An album's loudness is the gated loudness of every 400 ms block on the album,
|
|
-- not an average of its tracks' values: a quiet interlude and a loud single
|
|
-- should keep their difference when the album plays in order. It is computed
|
|
-- from the per-track block histograms in track_loudness (0065), summed, so no
|
|
-- audio is decoded again.
|
|
--
|
|
-- A derived value, recomputed by the loudness worker whenever its inputs
|
|
-- change. inputs_digest is an md5 over the album's present tracks and the
|
|
-- measurement each holds; the worker recomputes every album whose stored digest
|
|
-- no longer matches. That one comparison covers every way membership changes
|
|
-- (a scan moving a track between albums, a duplicate merge, a delete, a file
|
|
-- going missing or coming back) without hooking each of them.
|
|
CREATE TABLE album_loudness (
|
|
album_id uuid PRIMARY KEY REFERENCES albums (id) ON DELETE CASCADE,
|
|
-- NULL until every present track has a settled measurement: an album
|
|
-- leveled from half its tracks would jump when the rest arrived. Also NULL
|
|
-- for an album with no block above the gate. Clients fall back to track
|
|
-- gain while it is NULL.
|
|
integrated_lufs real,
|
|
-- The loudest true peak of any track on the album, so album gain is held
|
|
-- to the headroom of its loudest track.
|
|
true_peak_dbtp real,
|
|
tracks_total integer NOT NULL,
|
|
-- Tracks with a settled measurement (measured, silent or unreadable).
|
|
tracks_settled integer NOT NULL,
|
|
inputs_digest text NOT NULL,
|
|
computed_at timestamptz NOT NULL DEFAULT now()
|
|
);
|