From 3d083e7ca743de3b0b22269f1a0f1531f96abea7 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Fri, 10 Nov 2023 19:03:03 +0200 Subject: [PATCH] Tools: Tune: DRC: Add calculation of blob for speaker processing This patch adds generation of a blob that applies about 10 dB gain with compression and additional post gain of 3 dB for strong loudness boost effect. The drc_gen_coefs.m script is changed to display the master linear gain as decibels to help achieve suitable gain when setting parameters. Signed-off-by: Seppo Ingalsuo --- tools/tune/drc/drc_gen_coefs.m | 1 + tools/tune/drc/example_drc.m | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/tools/tune/drc/drc_gen_coefs.m b/tools/tune/drc/drc_gen_coefs.m index d9a1a087bac5..28479934732e 100644 --- a/tools/tune/drc/drc_gen_coefs.m +++ b/tools/tune/drc/drc_gen_coefs.m @@ -29,6 +29,7 @@ % Calculate makeup gain coefficients full_range_makeup_gain = (1 / coefs.ratio_base) ^ 0.6; % Empirical/perceptual tuning coefs.master_linear_gain = db2mag(params.post_gain) * full_range_makeup_gain; +coefs.master_linear_gain_db = 20*log10(coefs.master_linear_gain); % Calculate attack time coefficients attack_time = max(0.001, params.attack); diff --git a/tools/tune/drc/example_drc.m b/tools/tune/drc/example_drc.m index d5cec2e267ef..4ebae19c0be4 100644 --- a/tools/tune/drc/example_drc.m +++ b/tools/tune/drc/example_drc.m @@ -31,6 +31,14 @@ function example_drc() params.enabled = 1; drc_coefs_and_config_export(params, 'enabled'); +% Export experimental configuration for a small speaker +params.enabled = 1; +params.threshold = -25; +params.knee = 15; +params.ratio = 10; +params.post_gain = 3; +drc_coefs_and_config_export(params, 'generic_notebook_speaker'); + rmpath ../common end