can someone help. I’m calling these to record automation. Ive tested this and it works to record automation in Reaper, Ableton and Pro Tools but not Cubase or Studio One. In Studio One and Cubase the automation line moves but no points are recorded. i assume this is all i need to do to record the automation. maybe ive missed a step in setting up the automation ? any help would be much appreciated. If someone could confirm at least that this is the correct procedure at least it would help. im at a loss.
The code snippet looks alright. Normally the begin/end gesture calls would surround some continuous gesture, so for an interaction like a slider drag you should only call these once at the begin/end of the drag, rather than on each new slider value. For discrete controls, like buttons or mode selectors, the snippet looks fine.
To diagnose the problem, some more context would be helpful:
What’s triggering this code snippet? Are you doing this in response to a user interaction (slider drag, button click etc.) or something else? In particular, is this triggered by some other parameter changing?
Is the snippet called on the message thread, or on some other thread (e.g. the audio thread)? You can find this out by sticking a breakpoint on the snippet and then checking the call stack.
What plugin format are you testing, VST2 or VST3?
If you’re able to provide a small code example of a plugin that you’d expect to work, along with a test procedure to reproduce the faulty behaviour, that would be helpful. That way, we can debug exactly the issue you’re seeing.
I tried recording some automation in Cubase 13 on Windows in the JUCE AudioPluginDemo VST3. I set the track to “automation write” mode, hit the record button, then dragged the parameter sliders in the plugin editor with the mouse. I observed that automation was recorded correctly. I could also see that beginChangeGesture, setValueNotifyingHost, and endChangeGesture were called when I put breakpoints in those functions. Therefore, I believe that this method of automation recording is functioning correctly.
Thanks, actually i found my issue to be related to the code not being called on the correct thread. I encapsulated the function inside MessageManager::callAsync and it worked.