Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide bypass as an automation control #105

Open
jayache80 opened this issue Jun 10, 2021 · 34 comments
Open

Provide bypass as an automation control #105

jayache80 opened this issue Jun 10, 2021 · 34 comments

Comments

@jayache80
Copy link

Plugins should provide the host application a bypass/enable control so that bypassing the plugin can be easily automated. Dragonfly has no such control, and it would great if it did!

@x42
Copy link

x42 commented Jun 10, 2021

see http://lv2plug.in/ns/lv2core#enabled

Internally this should smoothly ramp the reverb level faders to zero (and ignore the user set levels while disabled).

@mikelupe
Copy link

First of all, thanks for these plugins.

I tripple that, this bypass feature would indeed be great.

@michaelwillis
Copy link
Owner

You can automate bypass by setting the dry level to 100% and the other level(s) to 0%.

@x42
Copy link

x42 commented Jun 17, 2021

Similar logic applies to EQs: You can automate all gain to 0dB. Or for compressors: automate ratio to 1:1 and make-up gain to 0 etc..

It is however convenient to allow this without explicit automation with a single button press. Especially in hosts that don't have automation.

@falkTX
Copy link
Contributor

falkTX commented Jul 19, 2021

Note that this plugin being based on DPF, the framework already provides a way to do bypass.
doesnt need to be custom implemented to get this working

@frescoalfredo
Copy link

frescoalfredo commented Jul 20, 2021

What DAWs nowadays lack automation that can be used for this purpose? Even Ardour has it.

Lots of plugins don't have a bypass button/switch as part of the plugin. The DAW has always had a way of bypassing a plugin, so it seldom matters. The only time it concerns me is if the plugin has latency (because bypassing it might change plugin delay compensation in the DAW, and that's not something you'd want to do on-the-fly).

@mikelupe
Copy link

True, but this is generally about being convenient. Having to create potentially multiple automation lanes for all those parameters of a plugin that influence the original sound, is not very comfortable (see x42's comment above).

But indeed, it's not a show-stopper.

@frescoalfredo
Copy link

That kind of automation is trivial in Reaper, which is what I use. So I guess if it's difficult to do in Ardour, maybe that's why this FR was created.

@mikelupe
Copy link

As already mentioned, it would as well be convenient for those plugin hosts that do not have automation, it isn t only about DAWs.

@frescoalfredo
Copy link

I don't use any plugin host that's not specifically a DAW, so I wouldn't know of that problem. I had assumed any plugin host intended for live use of plugins would have this feature included, due to how many plugins don't contain this feature. It's arguably more important to be part of the host's feature set than that of a DAW, since a DAW can perform this in more than one way (and it doesn't necessarily need to be done "live" in a DAW). This has been standard in DAWs as long as I can remember with the possible exception of Cakewalk version 4 (live effects at that time on PC weren't much of a reality). If hosts exist without this feature, and I used one of those hosts, I'd make a feature request to the developer of the host. "It is easier to put on a pair of shoes than to wrap the earth in leather."

@mikelupe
Copy link

I agree that any non-DAW plugin host should have the ability to bypass or "disable" a plugin :)

@frescoalfredo
Copy link

In case you didn't catch this part of my last message, I'm really curious which hosts don't have that. If there is a standing feature request for this in a host (hopefully it's on Github), I'll go there and "+1" it. Just point me in that direction. :)

@x42
Copy link

x42 commented Jul 20, 2021

Lots of plugins don't have a bypass button/switch as part of the plugin.

Actually every VST3 has (mandatory), most VST2 do have an bypass and the vast majority of LV2s has as well.

That kind of automation is trivial in Reaper, which is what I use.

What if you already have existing automation that you don't want to change to temporarily bypass the plugin?
What if you use Reaper for live mixing and just need click-free bypass?
What is a user does not know which parameters should be automated and how fast to click-free bypass/enable?

@frescoalfredo
Copy link

I only have a few VST3 installed which aren't VSTi. I checked and sure enough, you're right about them all having a bypass parameter. I have to disable the UIs to see the "bypass" parameter for them, but it exists. This is the one new thing that I get to learn for the day. :)

As for VST2: I have approximately 40 of those, and none have a bypass parameter that isn't a wet/dry fader. About 1/4 of them have a wet/dry fader though. I turned off the UIs to see all parameters just in case. So you might be overestimating how many VST2 have this specific feature.

For temporarily bypassing a plugin while using existing automation: that's possible in Reaper. It depends on the automation mode/feature you're using. Latch preview mode works for this, even for a parameter with existing modulation/envelopes. It temporarily "takes over", overriding the existing automation, if you change a parameter with this mode on (selectable globally or per track). Switching to latch preview mode (and back to trim/read mode) can be assigned to a keyboard and/or MIDI shortcut.

Click-free bypass should work for any plugin that doesn't have 1) DC offset (something I consider a flaw in the design of the plugin, even if intentional...that's one of my "I'll die on this hill!" opinions lol), or 2) latency, which will suddenly cause DPC be adjusted when bypassing a plugin (which sometimes doesn't cause a problem anyway depending on the buffer size). For live use, I wouldn't choose a plugin that has latency anyway (or I'd disable features that introduce latency such as oversampling). I delete plugins if I notice they have DC offset, so that isn't a problem for me. Perhaps some plugins besides this cause clicks when bypassing though? I've never used one that does, if it doesn't fall within those 2 categories I mentioned. I'm struggling to think of anything else that might cause an issue like this. I even tried some tests with more "extreme"/"I'm trying to create clicks" settings of compressors (0 attack, 0 release, 0 knee, etc.) and still can't find a setting that makes a click when bypassing.

If a user doesn't know which parameters to automate...well, I guess if this is a live situation, that could be an issue. It's pretty easy in Reaper though since you can automate the last touched parameter. If you mean that a keyboard or MIDI shortcut could be assigned for that specific feature to be used instantly for any selected plugin: there are actions in Reaper specifically for this. You'd have to set that up in advance of course, but that would be part of your workflow if you used any plugins without this feature (including those which Reaper comes with). You might want a very specific action for toggling bypass in a way for your workflow which doesn't exist, but there are a couple dozen of them in the action list without even considering user scripts available in ReaPack. With those scripts, that covers any possibility I can think of for how a person would want to bypass an effect (based on fx slot, whether it's input fx or "track" effects, last focused fx, first or last fx in the chain, all fx on the track, all fx that aren't VSTi, and so on).

@x42
Copy link

x42 commented Jul 20, 2021

I have to disable the UIs to see the "bypass" parameter for them, but it exists.

This is used by the host when you operate the host's bypass/enable button. It is also usually automatable by itself.

As for VST2: [...]

VST2 is special. There is a built-in API (effSetBypass) call for the host to bypass/enable a plugin, it is not a user accessible control port.

For temporarily bypassing a plugin [...]

Yes, you can also use VCAs or Latch and whatnot.
But really when mixing one often just wants and press/hold a button and for quick A/B comparison. A single click.

If a user doesn't know which parameters to automate

That was a trick question :) Only the plugin itself knows to to properly bypass itself. It depends on various internal implementation details. Controls are also usually de-zippered internally and you cannot override this (internal bypass can).
In most cases it is also not a single parameter but multiple controls that have to be updated in lockstep, possibly with different steepness to avoid audible artifacts. You also mentioned PDC, bypassed plugins internally delay the signal so that this is no issue. There are also plenty of other details. e.g. many simple x-fades cause phasing artifacts for example.

All this is why professional plugins do have a dedicated bypass/enable control implemented by the plugin-developer, and so should dragonfly-reverb.

As @falkTX mentioned the framework used for this plugin already provides infrastructure for this.
nuff said

@frescoalfredo
Copy link

frescoalfredo commented Jul 20, 2021

Well I guess if "professional" plugins all have this, and falkTX said it can be done, Michael needs to do this. Got it. ;)

...despite the fact it's never been a problem for me. And that's not a "trick question". :)

@falkTX
Copy link
Contributor

falkTX commented Jul 20, 2021

Well, needs is a strong word...
I am sure Michael would appreciate some support thrown at him for adding new features.

@michaelwillis
Copy link
Owner

@falkTX Does the bypass feature in DPF implement some kind of crossfade or it just a hard on/off switch?

@falkTX
Copy link
Contributor

falkTX commented Jul 20, 2021

DPF does nothing. You just create a parameter and give it a special designation.
Then this parameter will change according to bypass/enabled state.
It is on the plugin side to take care of everything, the host and even the framework cannot do this automatically.

I dont have a simple example plugin, but I added this in Nekobi as a test at some point. It does nothing for Nekobi but I guess can be used as example here.
Start at https://github.com/DISTRHO/Nekobi/blob/master/plugins/Nekobi/DistrhoPluginNekobi.cpp#L254 and look around for the paramBypass variable.

Worth noting that this is working in LV2 but not yet in VST2 in DPF.
Basically because I was lacking an actual plugin to test this with. If you add this in, ping me and I will do the VST2 part.

@michaelwillis
Copy link
Owner

Oh, ha... I was wondering about that. I searched for "bypass" in DPF, and only found it in LV2-related files.

@frescoalfredo
Copy link

Yes, you can also use VCAs or Latch and whatnot.
But really when mixing one often just wants and press/hold a button and for quick A/B comparison. A single click.

To clarify about Reaper: as I mentioned, bypassing an effect is currently possible with a single click with any plugin irrespective of what format the plugin is and whether it has its own bypass or not. You might consider the way Reaper bypasses a particular plugin to be offensive in some way (if it has an issue when bypassing, as you described the technical considerations), but it is still possible to do with a single click. I regularly do this when comparing wet/dry signals (something that I obsessively do, a bit to my shame). The fact I've never noticed clicks when doing this for any plugin (other than for the 2 reasons I mentioned) is why I mentioned it.

I think the "click issue" of a DAW's own fx bypass is exaggerated at best. I hope implementing this to Dragonfly doesn't cause Michael any grief, if he decides to do this. It would be nice if the plugins could be considered "done", if they don't specifically need any extra features.

@mikelupe
Copy link

@JamesPeters667 I think you shouldn t underestimate the expertise of the Ardour devs. Maybe them insisting on such "small issues" as clickfree audio could make you considering switching to Ardour ;)

And btw I m curious about which modern software you know can be considered as "done"

@frescoalfredo
Copy link

You'll notice I used quotation marks around the word "done". Anyway it's Michael's choice, whether to do this or not. I shouldn't pretend to speak for him.

As for Ardour with "click-free audio": for some reason, I don't have clicks in my audio in Reaper either. :) As I've mentioned. This isn't a problem for me. I can only imagine it might be, in other DAWs.

@mikelupe
Copy link

Well, me too I used quotation marks around done :)

It would really be great, if Michael would find the time for this - these plugins are precious

@michaelwillis
Copy link
Owner

It's not just my choice! Free as in freedom, right? Anybody can build the feature if they want 😆

Honestly it wouldn't be too hard for me to build a bypass feature with a naïve crossfade, but that does potentially have phasing issues as mentioned by @x42.

@falkTX
Copy link
Contributor

falkTX commented Jul 20, 2021

I am a DSP noob, but wouldnt silencing the inputs (so reverb keeps its tail) be enough?
Or perhaps even fade the inputs across a few milliseconds (with care to work for any sample rate).

The tail cutoff should be optional, otherwise it becomes impossible to cut any problematic tail.

Not speaking about dragonfly in particular, but for any reverb.
I have interest to know how a reverb bypass is supposed to work in order to be considered nice and proper.

@x42
Copy link

x42 commented Jul 20, 2021

reverbs are tricky. Likely the best is to fade the output.

When fading the reverb's input to silence there may be still be a long tail. Besides you usually need to keep feeding the reverb, because if you don't, then things can get ugly on when re-enabling it.

@pauldavisthefirst
Copy link

To clarify about Reaper: as I mentioned, bypassing an effect is currently possible with a single click with any plugin irrespective of what format the plugin is and whether it has its own bypass or not.

Ardour has a disable button for every plugin too. This isn't the same as a proper bypass button, and it isn't automatable (because the "control" is owned by the host, whereas automatable parameters belong to the plugin).

@x42
Copy link

x42 commented Jul 20, 2021

because the "control" is owned by the host

Except when it isn't :) For VST3 Ardour's GUI bypass/enable button directly controls the plugin's bypass/enable control. Same for LV2 and VST2 plugins that support this feature.

When a plugin provides a bypass control, it is no longer possible to hard bypass it using Ardour's GUI (it's still available via scripting). Only if a plugin does not offer that feature, Ardour's GUI offers to hard bypass the plugin (which usually causes an audible artifact).

@pauldavisthefirst
Copy link

Except when it isn't :) For VST3 Ardour's GUI bypass/enable button directly controls the plugin's bypass/enable control. Same for LV2 and VST2 plugins that support this feature.

Yes, sorry, that wasn't clear. I was referring solely to the disable/enable button that is part of Ardour, and forgot that we do not show it if the plugin has its own bypass control.

@frescoalfredo
Copy link

To clarify about Reaper: as I mentioned, bypassing an effect is currently possible with a single click with any plugin irrespective of what format the plugin is and whether it has its own bypass or not.

Ardour has a disable button for every plugin too. This isn't the same as a proper bypass button, and it isn't automatable (because the "control" is owned by the host, whereas automatable parameters belong to the plugin).

Reaper also has an offline toggle that can be used for any plugin (assignable to buttons or shortcuts as usual), which unloads the plugin except for a placeholder in the mixer (and presumably its parameter info for when it's toggled online again). And you definitely don't want to do this live. :)

@michaelwillis
Copy link
Owner

Let's say I do implement this. Would it be sufficient to only expose it as a bypass parameter to the host, and not create a graphical button on the user interface?

Also, let's say you hit the reverb with a burst of sound, then enable bypass, and then disable bypass a moment later. Would you expect to hear the remains of the reverb tail at that point? Or would the bypass clear the reverb's internal buffers?

What amount of time makes for a good crossfade to avoid the click/pop sound? I imagine it being a double digit number of samples, which at 44.1kHz or 48kHz would be around one millisecond. Is that too short? Should it be calculated as a fixed period of time regardless of sample rate, or a fixed number of samples?

@mikelupe
Copy link

mikelupe commented Jul 30, 2021

My personal point of view as a user:
Adding the automation parameter would already be great. A missing button wouldn't be that of a drawback at all (using the "generic UI would reveal the bypass flag anyway afaik).

And flushing the reverb buffer would also be ok - in the case of the need for "special effects" like bringing back the (old) reverb tail, working with the other parameters would be legit.

For the third point about the crossfade, I'll let the pros commenting on it :)

@x42
Copy link

x42 commented Aug 9, 2021

What amount of time makes for a good crossfade to avoid the click/pop sound?

Anything that prevents audible amplitude modulation. Something between 1/25 Hz .. 1/100 Hz.

But for a reverb with pre-delay a cross-fade is not the correct way. you likely also need to reduce the pre-delay to zero or risk comb-filter artifacts when doing dry/wet fades.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants