From 9386847cc9c6b61a33dda35adee8a14ee43c341a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 18 Feb 2024 18:19:35 +0100 Subject: [PATCH] Fix ACE Compressor inplace processing #9636 --- libs/ardour/parameter_descriptor.cc | 13 ++++++++++++- libs/plugins/a-comp.lv2/a-comp.c | 10 ++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/libs/ardour/parameter_descriptor.cc b/libs/ardour/parameter_descriptor.cc index a4fed84675..ddd32244f5 100644 --- a/libs/ardour/parameter_descriptor.cc +++ b/libs/ardour/parameter_descriptor.cc @@ -138,9 +138,20 @@ ParameterDescriptor::ParameterDescriptor(const Evoral::Parameter& parameter) case MidiChannelPressureAutomation: case MidiNotePressureAutomation: lower = 0.0; - normal = 0.0; upper = 127.0; print_fmt = "%.0f"; + switch(parameter.id()) { + case 7: // Channel Volume (MSB) + normal = 127; + break; + case 8: // Balance (MSB) + case 10: // Pan (MSB) + normal = 64; + break; + default: + normal = 0.0; + break; + } break; case MidiPitchBenderAutomation: lower = 0.0; diff --git a/libs/plugins/a-comp.lv2/a-comp.c b/libs/plugins/a-comp.lv2/a-comp.c index d533754c21..3557fc01cf 100644 --- a/libs/plugins/a-comp.lv2/a-comp.c +++ b/libs/plugins/a-comp.lv2/a-comp.c @@ -338,6 +338,12 @@ run(LV2_Handle instance, uint32_t n_samples) makeup_target = 1.f; } + for (uint32_t c=0; cv_knee != *acomp->knee) { acomp->v_knee = *acomp->knee; @@ -366,7 +372,7 @@ run(LV2_Handle instance, uint32_t n_samples) for (i = 0; i < n_samples; i++) { maxabs = 0.f; for (uint32_t c=0; c max_out) {