From 20bacaef35b68816cbcd59ae5f5a1be1ffdff07c Mon Sep 17 00:00:00 2001 From: Florian Paul Schmidt Date: Sat, 8 Oct 2022 19:57:27 +0200 Subject: [PATCH 1/2] add summed bypass (to enable delay tails to go on after bypassing) --- src/effects.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/effects.c b/src/effects.c index ff483be..77b9783 100644 --- a/src/effects.c +++ b/src/effects.c @@ -1963,6 +1963,17 @@ static int ProcessPlugin(jack_nframes_t nframes, void *arg) /* Run the plugin with zero buffer to avoid 'pause behavior' in delay plugins */ lilv_instance_run(effect->lilv_instance, nframes); + if (effect->bypass > 1.5f) + { + for (i = 0; i < effect->output_audio_ports_count; i++) + { + float *buffer_out = (float*)jack_port_get_buffer(effect->output_audio_ports[i]->jack_port, nframes); + for (jack_nframes_t frame = 0; frame < nframes; ++frame) + { + buffer_out[frame] += ((float*)effect->output_audio_ports[i]->buffer)[frame]; + } + } + } /* no need to silence plugin audio or cv, they are unused during bypass */ } /* Plugins without audio inputs */ From fc55fe6fb311669392de99aa446cc3fd429ac9b7 Mon Sep 17 00:00:00 2001 From: Florian Paul Schmidt Date: Sat, 8 Oct 2022 22:35:00 +0200 Subject: [PATCH 2/2] make summed bypass unconditional again --- src/effects.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/effects.c b/src/effects.c index 77b9783..cefa725 100644 --- a/src/effects.c +++ b/src/effects.c @@ -1963,17 +1963,14 @@ static int ProcessPlugin(jack_nframes_t nframes, void *arg) /* Run the plugin with zero buffer to avoid 'pause behavior' in delay plugins */ lilv_instance_run(effect->lilv_instance, nframes); - if (effect->bypass > 1.5f) + for (i = 0; i < effect->output_audio_ports_count; i++) { - for (i = 0; i < effect->output_audio_ports_count; i++) + float *buffer_out = (float*)jack_port_get_buffer(effect->output_audio_ports[i]->jack_port, nframes); + for (jack_nframes_t frame = 0; frame < nframes; ++frame) { - float *buffer_out = (float*)jack_port_get_buffer(effect->output_audio_ports[i]->jack_port, nframes); - for (jack_nframes_t frame = 0; frame < nframes; ++frame) - { buffer_out[frame] += ((float*)effect->output_audio_ports[i]->buffer)[frame]; - } - } - } + } + } /* no need to silence plugin audio or cv, they are unused during bypass */ } /* Plugins without audio inputs */