# AudioProcessor::setParameterNotifyingHost threading

**URL:** <https://forum.juce.com/t/audioprocessor-setparameternotifyinghost-threading/10775>\
**Category:** Audio Plugins\
**Created:** [July 12, 2013, 2:04pm UTC](https://forum.juce.com/t/audioprocessor-setparameternotifyinghost-threading/10775 "2013-07-12T14:04:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![atom](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/atom/32/113_2.png) [@atom](https://forum.juce.com/u/atom)\
**Post date:** [July 12, 2013, 2:04pm UTC](https://forum.juce.com/t/audioprocessor-setparameternotifyinghost-threading/10775/1 "2013-07-12T14:04:54Z")

</div>

Why can’t we set parameters on threads different then the MessageThread (i do that from the MIDI Input thread for example). I had no problems so far. Do i need to change this ?

```auto
void AudioProcessor::setParameterNotifyingHost (const int parameterIndex,
                                                 const float newValue)
 {
+ jassert (MessageManager::getInstance()->isThisTheMessageThread());
+
     setParameter (parameterIndex, newValue);
     sendParamChangeMessageToListeners (parameterIndex, newValue);
 } 
```

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 15, 2013, 10:23am UTC](https://forum.juce.com/t/audioprocessor-setparameternotifyinghost-threading/10775/2 "2013-07-15T10:23:32Z")

</div>

I think it was because of this:  
[http://rawmaterialsoftware.com/viewtopic.php?f=8&t=11624](http://rawmaterialsoftware.com/viewtopic.php?f=8&t=11624)

---

<div class="post-metadata">

**Author:** ![atom](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/atom/32/113_2.png) [@atom](https://forum.juce.com/u/atom)\
**Post date:** [July 16, 2013, 10:15am UTC](https://forum.juce.com/t/audioprocessor-setparameternotifyinghost-threading/10775/3 "2013-07-16T10:15:06Z")

</div>

Does this mean that when the host calls setParametef on my AudioProcessor, i’m sure it will be on the MessageThread ?

I always thought that parameter changes happened on the audio thread.

---

<div class="post-metadata">

**Author:** ![atom](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/atom/32/113_2.png) [@atom](https://forum.juce.com/u/atom)\
**Post date:** [July 16, 2013, 12:48pm UTC](https://forum.juce.com/t/audioprocessor-setparameternotifyinghost-threading/10775/4 "2013-07-16T12:48:09Z")

</div>

I think i answered that question myself by reading some forums (for example the reaper forum [http://forum.cockos.com/showthread.php?t=60633](http://forum.cockos.com/showthread.php?t=60633)).

It looks like setParameter can be called from a different thread, both different then the Audio and the Message thread, shouldn’t there be an assertion in that too ? If we want to be consistent about  
threads. I can imagine the same thing applies to parameter names and value formatting.
