# Using setCurrentProgram() in VST3 plugins doesn't change parameters or state (host side)

**URL:** <https://forum.juce.com/t/using-setcurrentprogram-in-vst3-plugins-doesnt-change-parameters-or-state-host-side/54296>\
**Category:** Audio Plugins\
**Created:** [December 28, 2022, 11:50am UTC](https://forum.juce.com/t/using-setcurrentprogram-in-vst3-plugins-doesnt-change-parameters-or-state-host-side/54296 "2022-12-28T11:50:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![migudmigu](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@migudmigu](https://forum.juce.com/u/migudmigu)\
**Post date:** [December 28, 2022, 11:50am UTC](https://forum.juce.com/t/using-setcurrentprogram-in-vst3-plugins-doesnt-change-parameters-or-state-host-side/54296/1 "2022-12-28T11:50:50Z")

</div>

I can’t set the presets in VST3 plugins in my JUCE hosting application. It works for AUs but not for VST3.

The plugin i’m using to test this is [Tal Reverb 2](https://tal-software.com/products/tal-reverb).

`getNumPrograms()` returns 10;  
Using `getProgramName(index)` in each of the indexes returns 10 different program names;

`setCurrentProgram(index);` does not change the plugin state retrieved with `getStateInformation()` and the parameters don’t change in the editor.

Although, the method `AudioProcessorListener::audioProcessorParameterChanged` is called 1 time, with the program parameter index and the new value.

This is essential for hosting VST3 plugins and I can’t make it work.  
I also tested the same plugin in Reaper, and it lists the presets and is able to set them.  
Is this a bug within JUCE? Am I missing something?

Thank you 😉

---

<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:** [January 16, 2023, 2:13pm UTC](https://forum.juce.com/t/using-setcurrentprogram-in-vst3-plugins-doesnt-change-parameters-or-state-host-side/54296/2 "2023-01-16T14:13:44Z")

</div>

Thanks for reporting. This issue should be resolved here:

> <https://github.com/juce-framework/JUCE/commit/210ed82ca26b047b2e00f0d8f913996a2dc9228c>
>
> Previously, all parameter changes were routed first into
> cachedParamValues. Then…, on each audio callback, an update would be sent
> to the editor via the parameterDispatcher for each changed value in
> cachedParamValues.
> 
> Now, parameter changes are immediately added to the parameterDispatcher,
> without needing to wait for an audio callback.

---

<div class="post-metadata">

**Author:** ![migudmigu](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@migudmigu](https://forum.juce.com/u/migudmigu)\
**Post date:** [January 17, 2023, 11:28am UTC](https://forum.juce.com/t/using-setcurrentprogram-in-vst3-plugins-doesnt-change-parameters-or-state-host-side/54296/3 "2023-01-17T11:28:49Z")

</div>

Thank you! Solved it by forcing the plugin to process audio. But this seems like a better solution.
