More VST3 legacy issues

I thought we had our pre-JUCE legacy sessions loading fine with the new JUCE VST3 versions of our plugins, but we discovered that in Cubase (at least), the solution that allows our old automation data to be correctly recognized is turning our discrete parameters into continuous parameters. If we define JUCE_FORCE_USE_LEGACY_PARAM_IDS as 1 for the VST3 wrapper, then our old automation data shows up, but the discrete controls become continuous controls (as you can see by drawing automation data using the pencil tool). But if we define that macro as 0, then the automated parameters fail to be mapped at all, but the discrete parameters remain as discrete parameters.

It looks like setting that to 1 sets forceLegacyParamIDs, which when true prevents discrete parameters from having their stepCount set properly.

How can I make my plugins (using JUCE 5.3.2) properly map my legacy VST3 parameters while still supporting discrete parameters?

It looks like I can just remove the check for !forceLegacyParamIDs from this line, and it works.

if (! forceLegacyParamIDs && param.isDiscrete())

But is this ok to do? So far, it seems to work in Cubase and Studio One on the Mac.

That looks safe enough to me. The forceLegacyParamIDs guard is there to ensure backwards compatibility with old JUCE-based plug-ins, rather than to ensure correctness.

1 Like