From 09ab08b50313b4a17e94367ca1b946b7c01adb31 Mon Sep 17 00:00:00 2001 From: Mikkeli Matlock Date: Thu, 24 Oct 2024 18:49:00 +0900 Subject: [PATCH] updated headroom conditions --- master_core.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/master_core.py b/master_core.py index afb710c..c1ccf77 100644 --- a/master_core.py +++ b/master_core.py @@ -73,8 +73,11 @@ class AudioFile: # Normalize RMS for color mapping - # check maximum amplitude to determine mastering headspace - if self.max_amplitude > 0.95: + # check maximum power to determine mastering headspace: + # a -6 dBFS headroom should yield a max power of around 0.25 + # otherwise could go anywhere, but we take 0.6 + local_max_power = np.max(self.rms_array) + if local_max_power > 0.3: norm = mcolors.Normalize(vmin=0, vmax=0.6) maxpower = 0.6 else: