From d0918b98fa0cfba21208a4fb5ed153687b8f02c3 Mon Sep 17 00:00:00 2001 From: Ryan Billing Date: Fri, 4 Oct 2013 01:57:00 +1300 Subject: DSP Compressor: Sidechain, Exponential Atk/Rls This is an improvement to the current compressor which I have added to my own Sansa Fuze V2 build. I am submitting here in case others find it interesting. Features added to the existing compressor: Attack, Look-ahead, Sidechain Filtering. Exponential attack and release characteristic response. Benefits from adding missing features: Attack: Preserve perceived "brightness" of tone by letting onset transients come through at a higher level than the rest of the compressed program material. Look-ahead: With Attack comes clipping on the leading several cycles of a transient onset. With look-ahead function, this can be pre-emptively mitigated with a slower gain change (less distortion). Look-ahead limiting is implemented to prevent clipping while keeping gain change ramp to an interval near 3ms instead of instant attack. The existing compressor implementation distorts the leading edge of a transient by causing instant gain change, resulting in log() distortion. This sounds "woofy" to me. Exponential Attack/Release: eMore natural sounding. On attack, this is a true straight line of 10dB per attack interval. Release is a little different, however, sounds natural as an analog compressor. Sidechain Filtering: Mild high-pass filter reduces response to low frequency onsets. For example, a hard kick drum is less likely to make the whole of the program material appear to fade in and out. Combined with a moderate attack time, such a transient will ride through with minimal audible artifact. Overall these changes make dynamic music sound more "open", more natural. The goal of a compressor is to make dyanamic music sound louder without necessarily sounding as though it has been compressed. I believe these changes come closer to this goal. Enjoy. If not, I am enjoying it Change-Id: I664eace546c364b815b4dc9ed4a72849231a0eb2 Reviewed-on: http://gerrit.rockbox.org/626 Tested: Purling Nayuki Reviewed-by: Michael Giacomelli --- apps/settings_list.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/settings_list.c') diff --git a/apps/settings_list.c b/apps/settings_list.c index 6ffb2b551b..bd2bfce36f 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -1653,7 +1653,11 @@ const struct settings_list settings[] = { CHOICE_SETTING(F_SOUNDSETTING|F_NO_WRAP, compressor_settings.knee, LANG_COMPRESSOR_KNEE, 1, "compressor knee", "hard knee,soft knee", compressor_set, 2, - ID2P(LANG_COMPRESSOR_HARD_KNEE), ID2P(LANG_COMPRESSOR_SOFT_KNEE)), + ID2P(LANG_COMPRESSOR_HARD_KNEE), ID2P(LANG_COMPRESSOR_SOFT_KNEE)), + INT_SETTING_NOWRAP(F_SOUNDSETTING, compressor_settings.attack_time, + LANG_COMPRESSOR_ATTACK, 5, + "compressor attack time", UNIT_MS, 0, 30, + 5, NULL, NULL, compressor_set), INT_SETTING_NOWRAP(F_SOUNDSETTING, compressor_settings.release_time, LANG_COMPRESSOR_RELEASE, 500, "compressor release time", UNIT_MS, 100, 1000, -- cgit v1.2.3