Connecting AudioUnit bypass to button?

For AudioUnits, we don’t add the bypass parameter to the APVTS. But now we want to add a button in our plugin to allow the user to turn bypass on and off there. Is there some way to use an attachment to the master bypass in this case? It doesn’t have an index since it’s not in the APVTS, so using the normal button attachment doesn’t cause the host to recognize the button state changes, and our button doesn’t change if the bypass is changed in the host (for AU hosts that have such a button in the first place; Logic does not).

Are you using ButtonParameterAttachment, or the older APVTS attachment?

Just in case you’re not aware, ButtonParameterAttachment can be attached directly to a parameter, without using the APVTS at all. If you haven’t tried out this class, I’d recommend giving it a go.

https://docs.juce.com/master/classButtonParameterAttachment.html

Ah, I was using a different type of attachment. Nice.

Well, that almost works. Our processing responds correctly, and our button turns on and off when the bypass button the host provides is pressed, but the host’s bypass button doesn’t follow our plugin’s button state (even though the processor gets notified of the change and our DSP responds correctly). (This is in Studio One. Logic doesn’t have a bypass button, just the activate/deactivate button). And it works correctly in both directions for the VST3 instance in Studio One. It just has this one defect in an AudioUnit in Studio One. Any thoughts how I can get the host-provided bypass button to follow our bypass button?

Are you aware of other AU plugins that have this functionality in Studio One? If not, it’s possible that this feature simply doesn’t work in that host.

Not offhand, no. We recommend using VST3 in Studio One, anyway, so maybe this one can be ignored (and documented four our users). Thanks!