# Update ValueTreeState parameters in audioThread with async call to listeners

**URL:** <https://forum.juce.com/t/update-valuetreestate-parameters-in-audiothread-with-async-call-to-listeners/25519>\
**Category:** Audio Plugins\
**Created:** [December 11, 2017, 9:35am UTC](https://forum.juce.com/t/update-valuetreestate-parameters-in-audiothread-with-async-call-to-listeners/25519 "2017-12-11T09:35:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dams303](https://avatars.discourse-cdn.com/v4/letter/d/df788c/32.png) [@Dams303](https://forum.juce.com/u/Dams303)\
**Post date:** [December 11, 2017, 9:35am UTC](https://forum.juce.com/t/update-valuetreestate-parameters-in-audiothread-with-async-call-to-listeners/25519/1 "2017-12-11T09:35:19Z")

</div>

I need to update an AudioProcessorValueTreeState value synchronously in the audio thread but all I have found to do this is  
AudioProcessorValueTreeState::Parameter::setValue() which is also calling synchronously listeners. Since my parameter change listeners are triggering GUI updates I would like to have them called asynchronously.

Is there any way to update an AudioProcessorValueTreeState parameters from the AudioThread without making a synchronous call to the listeners, rather in an async callback?

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [December 11, 2017, 9:56am UTC](https://forum.juce.com/t/update-valuetreestate-parameters-in-audiothread-with-async-call-to-listeners/25519/2 "2017-12-11T09:56:02Z")

</div>

AudioProcessor-Parameters are not designed to be updated inside the audio thread.

Either their updated by the host (through automation etc…) or by the GUI of your plugin, in a way that the host can catch parameter changes (void setValueNotifyingHost) to record the automation.

Otherwise the whole automation logic inside your host would be impossible to implement.

Of course you could use extra state values, which work independently from parameters.
