# VST3 plugin issues with latest develop

**URL:** <https://forum.juce.com/t/vst3-plugin-issues-with-latest-develop/45880>\
**Category:** General JUCE discussion\
**Created:** [May 6, 2021, 4:19pm UTC](https://forum.juce.com/t/vst3-plugin-issues-with-latest-develop/45880 "2021-05-06T16:19:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RolandMR](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rolandmr/32/641_2.png) [@RolandMR](https://forum.juce.com/u/RolandMR)\
**Post date:** [May 6, 2021, 4:19pm UTC](https://forum.juce.com/t/vst3-plugin-issues-with-latest-develop/45880/1 "2021-05-06T16:19:22Z")

</div>

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.

```auto
    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:

> <https://github.com/Tracktion/JUCE/commit/40f0d56cf8d9d685593b0e1fbbc21bc4ae1cb5af>

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [May 6, 2021, 7:01pm UTC](https://forum.juce.com/t/vst3-plugin-issues-with-latest-develop/45880/2 "2021-05-06T19:01:36Z")

</div>

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

```auto
    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?

---

<div class="post-metadata">

**Author:** ![RolandMR](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rolandmr/32/641_2.png) [@RolandMR](https://forum.juce.com/u/RolandMR)\
**Post date:** [May 6, 2021, 7:23pm UTC](https://forum.juce.com/t/vst3-plugin-issues-with-latest-develop/45880/3 "2021-05-06T19:23:54Z")

</div>

I can confirm you change fixes Pigments as well. I’m using VST3 2.1.1.3815 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.

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [May 6, 2021, 7:43pm UTC](https://forum.juce.com/t/vst3-plugin-issues-with-latest-develop/45880/4 "2021-05-06T19:43:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [May 7, 2021, 1:14pm UTC](https://forum.juce.com/t/vst3-plugin-issues-with-latest-develop/45880/5 "2021-05-07T13:14:15Z")

</div>

I’ve pushed this change now:

> <https://github.com/juce-framework/JUCE/commit/1df59f74697fa143ac41dde6fdd2913500c43731>
