I’m encountering a highly specific and unusual bug that’s been eluding me for days. Despite my extensive experience in development, this issue is a first for me. The problem occurs exclusively within the Ableton Live environment, affecting both VST3 on macOS and Windows platforms. Here’s a detailed breakdown:
- Environment: The issue is observed in Ableton Live, specifically with VST3 plugins. It affects both Ableton Live 11 and 12, across macOS and Windows.
- Bug Description: The core of the problem lies in handling meta parameters. I have designed a meta parameter that adjusts the values of other parameters internally, without these changes being reported to the host (Ableton Live). This mechanism works flawlessly in all DAWs except for Ableton Live VST3.
- Trigger Condition: The bug manifests when I initiate a ‘begin change gesture’ on a parameter (referred to as a slave) that was previously modified by the meta parameter (referred to as the master), without the host being notified of this change. Following this action,
JuceVST3Component::processParameterChanges()is unexpectedly called. This method then executessetValueAndNotifyIfChanged(), which erroneously applies the value from the last automation event to the parameter. This results in the parameter’s value reverting to its last reported state, rather than maintaining the new value set by the meta parameter. - Additional Observation: This issue occurs immediately after the closure of the
JUCE_VST3_EMULATE_MIDI_CC_WITH_PARAMETERSblock, which may or may not be related to the problem.
Further Oddities Noted:
- This problem was not present in JUCE version 7.0.5.
- The issue is specifically tied to parameters that are slaves to a meta parameter. Interestingly, when parameters are adjusted through preset changes (which also aren’t reported to the host), this bug does not occur. In such cases, initiating a ‘beginGesture’ does not lead to the parameter value being reset to its previously reported value.
- Despite numerous attempts, I am unable to replicate this issue in a new simplified JUCE project despite my best efforts to replicate all the conditions i can think of. In that project “processParameterChanges” is not registering changes in the slave parameters and numParamsChanged is 0 when i send the begin gesture - unlike my original project.
I am using the last develop tip.
I’m at my wit’s end trying to diagnose and resolve this peculiar bug. If anyone has insights or suggestions on potential areas to investigate or solutions, your expertise would be greatly appreciated. The specificity of the issue to Ableton Live’s handling of VST3 plugins and its absence in earlier versions of JUCE suggests a complex interaction at play. Your thoughts and guidance on tackling this would be invaluable.
