# AAX plugin recalling slider positions after save/re-open project even though getStateInformation/setStateInformation is empty

**URL:** <https://forum.juce.com/t/aax-plugin-recalling-slider-positions-after-save-re-open-project-even-though-getstateinformation-setstateinformation-is-empty/56964>\
**Category:** Audio Plugins\
**Created:** [July 9, 2023, 1:24am UTC](https://forum.juce.com/t/aax-plugin-recalling-slider-positions-after-save-re-open-project-even-though-getstateinformation-setstateinformation-is-empty/56964 "2023-07-09T01:24:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![binkynat](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@binkynat](https://forum.juce.com/u/binkynat)\
**Post date:** [July 9, 2023, 1:24am UTC](https://forum.juce.com/t/aax-plugin-recalling-slider-positions-after-save-re-open-project-even-though-getstateinformation-setstateinformation-is-empty/56964/1 "2023-07-09T01:24:35Z")

</div>

Hi all, first post so here goes.

I am having problem with the demo version of our plugin (only the AAX in ProTools, other versions seem to work correctly) recalling the slider positions after closing the project and re-opening.

both getStateInformation & setStateInformation are empty (only in demo version).

I tried removing the AudioProcessorValueTreeState::SliderAttachment on each slider in the demo version only, and this worked (sort of) but now the sliders are re-setting back to default position every time the plugin window is closed and re-opened, in the same DAW session.

using JUCE v7.0.5

p.s. I haven’t seen this behaviour before in previous testing with ProTools (i don’t think so, would have noticed it i am sure?), but have updated my version since testing last plugin.

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)\
**Post date:** [July 10, 2023, 8:33am UTC](https://forum.juce.com/t/aax-plugin-recalling-slider-positions-after-save-re-open-project-even-though-getstateinformation-setstateinformation-is-empty/56964/2 "2023-07-10T08:33:03Z")

</div>

I believe this is happening because Pro Tools saves and restores the value of all automated parameters exposed by your plug-in, separately and in addition to the data that you manage with get/setStateInformation().  
So, even when you are not implementing those virtual functions, still Pro Tools saves the parameter values in its session data and restores them when you recall it.

That being said, perhaps you can have some luck by using the macro `JucePlugin_AAXDisableSaveRestore` provided by JUCE. I don’t have experience with it, but maybe it does exactly what you want.

---

<div class="post-metadata">

**Author:** ![binkynat](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@binkynat](https://forum.juce.com/u/binkynat)\
**Post date:** [July 10, 2023, 11:43pm UTC](https://forum.juce.com/t/aax-plugin-recalling-slider-positions-after-save-re-open-project-even-though-getstateinformation-setstateinformation-is-empty/56964/3 "2023-07-10T23:43:37Z")

</div>

Thankyou 🙂

Will give it a look/try.

If not, will probably just have to move to a time based demo with periodic white noise or something.

---

<div class="post-metadata">

**Author:** ![binkynat](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@binkynat](https://forum.juce.com/u/binkynat)\
**Post date:** [July 11, 2023, 2:56am UTC](https://forum.juce.com/t/aax-plugin-recalling-slider-positions-after-save-re-open-project-even-though-getstateinformation-setstateinformation-is-empty/56964/4 "2023-07-11T02:56:03Z")

</div>

So decided instead to keep it so AudioProcessorValueTreeState::SliderAttachment as not defined in Demo build, but then grab the values from the Processor and use those values in the Editor’s constructor for the Slider.setValue().

That was my initial thought as to how to handle it but i thought it was a little “sloppy”, but it is now working the way i want, and also shuts down the possibility of people using automation as a way to recall settings in the Demo plugin (which has no time limit).

Hopefully doing it this way won’t cause other unexpected issues. Will keep testing.
