VST3 plugin issues with latest develop

Reported by user:

  • pitch wheel is not at 0 (low position instead) when inserting AAS plugins and others, and new position not saved with edit

  • no sound at all for Cakewalk Rapture Pro

  • no sound for Arturia plugins until we change the first preset, but still no sound when quit and relaunch Waveform

I have Pigments, and have reproduced the last issue. I will try and get copies of the other plugins to reproduce. This is broken in 9f03bbc358d67a3e0d0e3d7082259a4155aebd85 and still working in 4cfe27af0858b125e0759fcb43e5179079aa9bb3.

The issue is this function here that I’m not quite sure the purpose of. After initialization, it loops through all the parameters and sets their value. Now I think they are all marked as dirty, then in the first processAudio it blasts every parameter back to the plugin because it thinks they are dirty.

    void setComponentStateAndResetParameters (Steinberg::MemoryStream& stream)
        jassert (editController != nullptr);

        warnOnFailureIfImplemented (editController->setComponentState (&stream));

        for (auto* parameter : getParameters())
            auto* vst3Param = static_cast<VST3Parameter*> (parameter);
            vst3Param->setValueFromEditor ((float) editController->getParamNormalized (vst3Param->getParamID()));

Here is my ‘fix’. Not sure it’s correct, but now plugins work again after load and parameters can also be updated from UI:

The following change to the FloatCache seems to fix the issue with AAS plugins:

    void set (size_t index, float value)
        jassert (index < size());
        const auto previous = values[index].exchange (value, std::memory_order_relaxed);
        const auto bit = previous == value ? 0 : (FlagType) 1 << (index % numFlagBits);
        flags[index / numFlagBits].fetch_or (bit, std::memory_order_acq_rel);

I couldn’t repro the Pigments issue on develop or on 9f03bbc35. I’m testing by opening an AudioPluginHost file with an instance of Pigments connected to midi + audio. I play some notes on the keyboard directly after loading the patch, and I can hear sounds being produced. Creating a new ‘fresh’ instance of Pigments also seems to work.

Please could you try out the change above and see whether it resolves the issues for you?

1 Like

I can confirm you change fixes Pigments as well. I’m using VST3 and after building AudioPluginHost on develop, dropping in the plugin and connecting the midi and audio, I got no audio out prior to your latest fix.

That’s great, thanks for testing the change. This should get merged at some point tomorrow.

I’ve pushed this change now: