I am experiencing an issue with automation in Cubase/Nuendo. It is very similar to another issue that has been fixed so I want to make sure it is understood that this is a different problem. The symptom is that when recording automation in Cubase/Nuendo, the parameter value returns to zero when I release the mouse. The "correct" behavior is for the the parameter to return to the previous value, just as it was before I start moving the slider to record the automation. This issue has been reported by several other users and had been fixed here.
I have brought in this change and it mostly works. However, it appears that when a plugin is initially loaded, there is no way to inform the host of the initial parameter values, so if I try to record automation immediately after loading a plugin, I still see the errant behavior. Basically, the host doesn't know the previous value because it hasn't been reported. The behavior returns to normal after the plugin notifies the host of its value, which occurs after any of the following three events:
- The user modifies the value of the plugin
- The session is closed and re-opened
- The user loads a preset into the plugin
I tried to fix this by calling "setValueNotifyingHost" in the constructor of my AudioProcessor-derived class, right after the parameters are added via the "addParameter" method. However, this does not work either because it is too early in the initialization sequence and the host hasn't yet been added to the list of audio processor "listeners". So under this specific condition, it appears that the plugin doesn't get a chance to report its parameter values to the host before automation begins.