summaryrefslogtreecommitdiff
path: root/libs/plugins
diff options
context:
space:
mode:
authorJohannes Mueller <github@johannes-mueller.org>2017-08-07 14:02:33 +0200
committerJohannes Mueller <github@johannes-mueller.org>2018-05-12 19:49:18 +0200
commit46aa204eb8e7d322ab16a6bb41e9abafa27cd38e (patch)
tree6c8d8eae58eb6c557c554c7e4c989407f83b61a9 /libs/plugins
parent40f12e1205d32d1f7232b970625f44b076b2f330 (diff)
Limit gain reduction of a-expander to 160 dB in order to ...
improve release behavior. This slows down the release after events like single snare hits as, the gain reduction only releases to 160 dB rather than to inf.
Diffstat (limited to 'libs/plugins')
-rw-r--r--libs/plugins/a-exp.lv2/a-exp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/plugins/a-exp.lv2/a-exp.c b/libs/plugins/a-exp.lv2/a-exp.c
index d3a29a689c..0b11f2ae48 100644
--- a/libs/plugins/a-exp.lv2/a-exp.c
+++ b/libs/plugins/a-exp.lv2/a-exp.c
@@ -372,6 +372,10 @@ run_mono(LV2_Handle instance, uint32_t n_samples)
current_gainr = Lxg - Lyg;
+ if (current_gainr > 160.f) {
+ current_gainr = 160.f;
+ }
+
if (current_gainr > old_gainr) {
current_gainr = release_coeff*old_gainr + (1.f-release_coeff)*current_gainr;
} else if (current_gainr < old_gainr) {
@@ -541,6 +545,10 @@ run_stereo(LV2_Handle instance, uint32_t n_samples)
current_gainr = Lxg - Lyg;
+ if (current_gainr > 160.f) {
+ current_gainr = 160.f;
+ }
+
if (current_gainr > old_gainr) {
current_gainr = release_coeff*old_gainr + (1.f-release_coeff)*current_gainr;
} else if (current_gainr < old_gainr) {