# Issue with VST3 MIDI CC emulation and pluginValVst3 tests

**URL:** <https://forum.juce.com/t/issue-with-vst3-midi-cc-emulation-and-pluginvalvst3-tests/33287>\
**Category:** General JUCE discussion\
**Created:** [May 7, 2019, 3:54pm UTC](https://forum.juce.com/t/issue-with-vst3-midi-cc-emulation-and-pluginvalvst3-tests/33287 "2019-05-07T15:54:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![frousse](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@frousse](https://forum.juce.com/u/frousse)\
**Post date:** [May 7, 2019, 3:54pm UTC](https://forum.juce.com/t/issue-with-vst3-midi-cc-emulation-and-pluginvalvst3-tests/33287/1 "2019-05-07T15:54:17Z")

</div>

Hi everyone,  
I have an issue with my plugin when executing the pluginValVst3 tests.  
The “Plugin state restoration” test fails:  
`!!! Test 1 failed: Parameters not restored on setStateInformation -- Expected value within 0.1 of: 1035.16, Actual value: 1043.75`  
The parameter values of my plugin were correct but the MIDI CC parameters’ values were different.  
Is this issue related to a bad behaviour of my plugin?

---

<div class="post-metadata">

**Author:** ![ttg](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ttg/32/14456_2.png) [@ttg](https://forum.juce.com/u/ttg)\
**Post date:** [May 7, 2019, 3:57pm UTC](https://forum.juce.com/t/issue-with-vst3-midi-cc-emulation-and-pluginvalvst3-tests/33287/2 "2019-05-07T15:57:19Z")

</div>

see this…  
[https://forum.juce.com/t/what-is-the-intention-of-macro-juce-vst3-emulate-midi-cc-with-parameters/17858/13](https://forum.juce.com/t/what-is-the-intention-of-macro-juce-vst3-emulate-midi-cc-with-parameters/17858/13)

if you don’t use midi just set the macro to be off explicility…

@dave96 - though I guess the test should ignore a parameter that has no `kCanAutomate` flag. this will fail for JUCE plug-ins prior to [https://github.com/WeAreROLI/JUCE/commit/0f752396a5b572270345366340b89c9e4a3c762a](https://github.com/WeAreROLI/JUCE/commit/0f752396a5b572270345366340b89c9e4a3c762a)

---

<div class="post-metadata">

**Author:** ![frousse](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@frousse](https://forum.juce.com/u/frousse)\
**Post date:** [May 7, 2019, 4:13pm UTC](https://forum.juce.com/t/issue-with-vst3-midi-cc-emulation-and-pluginvalvst3-tests/33287/3 "2019-05-07T16:13:56Z")

</div>

Thank you ! 😃

---

<div class="post-metadata">

**Author:** ![dave96](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dave96/32/8487_2.png) [@dave96](https://forum.juce.com/u/dave96)\
**Post date:** [May 8, 2019, 9:43am UTC](https://forum.juce.com/t/issue-with-vst3-midi-cc-emulation-and-pluginvalvst3-tests/33287/4 "2019-05-08T09:43:56Z")

</div>

I think it does that already? It only changes non-automatable, non-bypass parameters precisely for this reason: [https://github.com/Tracktion/pluginval/blob/ad76533716677ab60395afb64b550809422f1552/Source/tests/BasicTests.cpp#L232](https://github.com/Tracktion/pluginval/blob/ad76533716677ab60395afb64b550809422f1552/Source/tests/BasicTests.cpp#L232)

If there was a JUCE bug that wasn’t setting the correct flag so `AudioProcessorParameter::isAutomatable()` wasn’t returning the correct value, I think the plugin needs to be updated. There’s not really any way around this on the host/pluginval side?

---

<div class="post-metadata">

**Author:** ![ttg](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ttg/32/14456_2.png) [@ttg](https://forum.juce.com/u/ttg)\
**Post date:** [May 8, 2019, 11:53am UTC](https://forum.juce.com/t/issue-with-vst3-midi-cc-emulation-and-pluginvalvst3-tests/33287/5 "2019-05-08T11:53:27Z")

</div>

@frousse are by any chance tested a plug-in made with JUCE 4.x or an earlier pluginval? (It seems it was added [here](https://github.com/Tracktion/pluginval/commit/eece5b02e3bbfa672cb1e0342e6a432de5f32b41)).

@dave96 my sincere apologies. I should’ve looked at the code prior to mentioning you.

---

<div class="post-metadata">

**Author:** ![frousse](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@frousse](https://forum.juce.com/u/frousse)\
**Post date:** [May 9, 2019, 9:17am UTC](https://forum.juce.com/t/issue-with-vst3-midi-cc-emulation-and-pluginvalvst3-tests/33287/6 "2019-05-09T09:17:14Z")

</div>

I was using JUCE 5.2.0.  
Upgrading to JUCE 5.2.1 should solve the problem for me as the commit you mentionned was integrated on this version.  
I’m testing my plugin using pluginVal v0.2.3.
