It turns out that we should not be using parameter change callbacks to update internal variables. That's because parameter change callbacks are really meant to reject parameters that are out-of-bounds, and they can be chained. That means that if a later callback in the chain were to reject the change, the parameter database would not have the update, but we would have updated internal state based on it. That leads to an inconsistent system.
Instead, use the parameter events interface to look at changes to the parameters. This is called after all of the parameter change callbacks have happened, so we know for sure that this update has taken place.
It turns out that we should not be using parameter change callbacks to update internal variables. That's because parameter change callbacks are really meant to reject parameters that are out-of-bounds, and they can be chained. That means that if a later callback in the chain were to reject the change, the parameter database would not have the update, but we would have updated internal state based on it. That leads to an inconsistent system.
Instead, use the parameter events interface to look at changes to the parameters. This is called after all of the parameter change callbacks have happened, so we know for sure that this update has taken place.