HISE Logo Forum
    • Categories
    • Register
    • Login

    AAX plugin doesn't initiate default slider values when loaded in Pro Tools

    Scheduled Pinned Locked Moved General Questions
    49 Posts 10 Posters 2.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • FortuneF
      Fortune @Christoph Hart
      last edited by Fortune

      @Christoph-Hart This is not a proper solution.

      It can clutter with the saved settings in the Pro Tools project. It is obvious that there is a bug and it has to be fixed. Other plugins doesn't do that, so it is Hise related.

      Christoph HartC 1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart @Fortune
        last edited by

        Yeah, that's correct, but I don't know what else can be done. Protools simply ignores the value returned by juce::PluginParameter::getDefaultValue() (or overrides it with zero afterwards).

        In the JUCE forum you can read stuff like that:

        Short answer - yes, when Pro Tools loads a session, it does its own recall (like automation, but not dependent on the parameters being armed for automation) of parameter values.

        It does this first, and then calls the setStateInformation method (passing it back whatever chunk of data, presumably some XML, that you might have given it from getStateInformation). So you have the option then to overwrite your choice of parameter values.

        For setting a “new default” state (like @jcomusic and @parkellipsen are talking about above) you could set that explicity from within setStateInformation, if you detect (by parsing the XML for some telltale values) that it was passed the “old default” XML.

        https://forum.juce.com/t/aax-protools-plugin-states-persistent-over-multiple-sessions/29977/6

        gorangroovesG P 2 Replies Last reply Reply Quote 0
        • gorangroovesG
          gorangrooves @Christoph Hart
          last edited by

          @Christoph-Hart Thanks very much. I will be sure to bring this up with AVID. If it is affecting JUCE, then this is affecting a lot of developers and is not HISE-specific. It took me an hour just to get started with the "industry standard" Pro Tools. I felt like I was debugging their software and not there to test mine. Goodness fuck.

          I will report back on how this hack works.

          Goran Rista
          https://gorangrooves.com

          Handy Drums and Handy Grooves
          https://library.gorangrooves.com

          1 Reply Last reply Reply Quote 1
          • P
            ps @Christoph Hart
            last edited by

            @Christoph-Hart the problem is that you really have to find a specific custom trigger value for your plugin that a user will never save as preset / store the session with or that will most likely never be set when the user is duplicating the plugin in the daw. this is why I suggested main gain out because why would you store a session with main out put to -100.
            That's something I forgot to mention you have to use the lowest value of the slider range because that is what protools will set it to on init.
            So If you have set master gain range -70/ 0 you have to call If MasterGain.get Value()== -70 - load preset that you want as init.
            you could use a hidden dummy slider of course as well bit it will show up as plugin parameter and might lead to confusion.

            orangeO 1 Reply Last reply Reply Quote 0
            • orangeO
              orange @ps
              last edited by orange

              @ps @gorangrooves

              I've checked again the the plugins that are exported on June 2022 (develop branch). All of the sliders are working without any issues.

              I haven't built plugins with the current commit, but if this issue still persists, then the root cause might be some commits after that date.

              But I think setting the gain range to -70 or setting a timer object to call the settings won't be more than a temporary solution and won't be healthy.

              Since the time hasn't been passed so much from June, it could be easier to find the root cause.

              develop Branch / XCode 13.1
              macOS Monterey / M1 Max

              1 Reply Last reply Reply Quote 0
              • LindonL
                Lindon @Christoph Hart
                last edited by Lindon

                @Christoph-Hart said in AAX plugin doesn't initiate default slider values when loaded in Pro Tools:

                So a "generic" script would look like this:

                const var ProtoolsParameterFixer = Engine.createTimerObject();
                
                ProtoolsParameterFixer.setTimerCallback(function()
                {
                	for(c in Content.getAllComponents(".*"))
                	{
                		if(c.get("isPluginParameter"))
                		{
                			c.setValue(c.get("defaultValue"));
                			c.changed();
                		}
                	}
                	
                	this.stopTimer();
                });
                
                ProtoolsParameterFixer.startTimer(600);
                

                @gorangrooves if this solves the problem I could add this as native C++ function, then it will only be called when loaded as AAX plugin and I'll try to not make a educated guess how long it will take, but somehow call it after the plugin initialisation. Still not sure why the default values aren't used by Protools, the code in HISE looks OK.

                -- Im confused - wont this just reset every component to its default value everytime you start the plugin?

                So I load it into PFools for the first time and it does this = good, I change some things and save my session, then I reopen the session only to lose all the changes I made to components = bad?

                -- or do I not really understand(likely)?

                HISE Development for hire.
                www.channelrobot.com

                orangeO 1 Reply Last reply Reply Quote 0
                • orangeO
                  orange @Lindon
                  last edited by orange

                  @Lindon Yes I think it will override the saved PT session settings, so PT daw session can't be saved.

                  develop Branch / XCode 13.1
                  macOS Monterey / M1 Max

                  LindonL 1 Reply Last reply Reply Quote 0
                  • LindonL
                    Lindon @orange
                    last edited by

                    @orange said in AAX plugin doesn't initiate default slider values when loaded in Pro Tools:

                    @Lindon Yes I think it will override the saved PT session settings, so PT daw session can't be saved.

                    hmm, thats not a solution then is it...sadly.

                    HISE Development for hire.
                    www.channelrobot.com

                    Christoph HartC 1 Reply Last reply Reply Quote 1
                    • Christoph HartC
                      Christoph Hart @Lindon
                      last edited by

                      I think the secret ingredient that I forgot to make this work with restoring projects is like @ps suggested: use a bogus value that no sane user will ever use for a particular parameter, then restore if that value is met.

                      Is it hacky? Sure. Is it the appropriate solution to the problem. Hell yes.

                      LindonL 1 Reply Last reply Reply Quote 0
                      • LindonL
                        Lindon @Christoph Hart
                        last edited by Lindon

                        @Christoph-Hart said in AAX plugin doesn't initiate default slider values when loaded in Pro Tools:

                        I think the secret ingredient that I forgot to make this work with restoring projects is like @ps suggested: use a bogus value that no sane user will ever use for a particular parameter, then restore if that value is met.

                        Is it hacky? Sure. Is it the appropriate solution to the problem. Hell yes.

                        I think I'm going to prefer a config file read/write:

                        if the file is not there then do this thing, and write the file...

                        in fact what (I assume) we all want is ProTools to load our "default" preset, does it not do this also?

                        HISE Development for hire.
                        www.channelrobot.com

                        orangeO LindonL 2 Replies Last reply Reply Quote 0
                        • orangeO
                          orange @Lindon
                          last edited by orange

                          @Lindon said in AAX plugin doesn't initiate default slider values when loaded in Pro Tools:

                          I think I'm going to prefer a config file read/write:

                          if the file is not there then do this thing, and write the file...

                          Let's say the user has 50 sessions with your plugins (and on each session there are a couple of plugins), so the plugin will save each setting for each plugin instance?

                          Why try harder? All of these sliders were working till a couple of months ago, I think the reason will be (needs to be) fixed.

                          develop Branch / XCode 13.1
                          macOS Monterey / M1 Max

                          d.healeyD LindonL 2 Replies Last reply Reply Quote 0
                          • d.healeyD
                            d.healey @orange
                            last edited by

                            @orange Can you narrow down to which commit?

                            Libre Wave - Freedom respecting instruments and effects
                            My Patreon - HISE tutorials
                            YouTube Channel - Public HISE tutorials

                            orangeO 1 Reply Last reply Reply Quote 0
                            • LindonL
                              Lindon @orange
                              last edited by

                              @orange well I have a user with AAX plugins from over a year ago -- and these are not working either - so its not a recent problem.

                              HISE Development for hire.
                              www.channelrobot.com

                              1 Reply Last reply Reply Quote 0
                              • LindonL
                                Lindon @Lindon
                                last edited by

                                @Lindon said in AAX plugin doesn't initiate default slider values when loaded in Pro Tools:

                                I think I'm going to prefer a config file read/write:

                                Actually I'm pretty sure none of these approaches work if we think about it for a minute....

                                HISE Development for hire.
                                www.channelrobot.com

                                1 Reply Last reply Reply Quote 0
                                • orangeO
                                  orange @d.healey
                                  last edited by orange

                                  @d-healey said in AAX plugin doesn't initiate default slider values when loaded in Pro Tools:

                                  @orange Can you narrow down to which commit?

                                  @Lindon said in AAX plugin doesn't initiate default slider values when loaded in Pro Tools:

                                  @orange well I have a user with AAX plugins from over a year ago -- and these are not working either - so its not a recent problem.

                                  No it is a recent issue (I haven't compiled the current commit yet). The button issue is there for years. But sliders were working.

                                  The exported plugins on June (develop branch) are working. You can try these yourself, I checked yesterday.

                                  develop Branch / XCode 13.1
                                  macOS Monterey / M1 Max

                                  gorangroovesG 1 Reply Last reply Reply Quote 0
                                  • gorangroovesG
                                    gorangrooves @orange
                                    last edited by

                                    Ideally, PT should load the default values. If we can't have the ideal, we need to settle for the next best solution, at least until the ideal is achievable.

                                    Looking at Christoph's script and comparing it to my sliders, this is what I notice:
                                    The default values for the sliders do not match the initial values of the sliders. Some sliders may be at 0.34, while the default value is set to 0.8. Actually, most sliders seem to have this value of 0.8. So restoring the defaultValue would not solve the problem unless we go and manually enter default values for all sliders to match what they are on the initial load normally. This would be very time-consuming.

                                    So, I guess recalling the default preset would be a more practical solution, as @ps suggested. Of course, this means that you must have the presets implemented in your plugins.

                                    Goran Rista
                                    https://gorangrooves.com

                                    Handy Drums and Handy Grooves
                                    https://library.gorangrooves.com

                                    gorangroovesG 1 Reply Last reply Reply Quote 0
                                    • gorangroovesG
                                      gorangrooves @gorangrooves
                                      last edited by

                                      So, to get around the defaultValue not being equal to the actual value, I tweaked a portion of Christoph's script which should be run once when final settings are made, then commented out before compiling.

                                      //Set defaultValue of all components, which are plugin parameters, to their current values
                                      // IMPORTANT: Comment this out before the plugin compiling
                                      
                                      for(c in Content.getAllComponents(".*"))
                                      	{
                                      		if(c.get("isPluginParameter"))
                                      		{
                                      			c.set("defaultValue", c.getValue());
                                      		}
                                      	}
                                      

                                      Now that the default values are correct, we can proceed with the combination of Christoph's and ps scripts.

                                      Goran Rista
                                      https://gorangrooves.com

                                      Handy Drums and Handy Grooves
                                      https://library.gorangrooves.com

                                      gorangroovesG 1 Reply Last reply Reply Quote 0
                                      • gorangroovesG
                                        gorangrooves @gorangrooves
                                        last edited by

                                        Alright, guys, please check if this looks OK, using @Christoph-Hart 's script and combined with @ps strategy.

                                        //-------Pro Tools initial settings fix
                                        
                                        const var ProtoolsParameterFixer = Engine.createTimerObject();
                                        const var DrumsSlider = Content.getComponent("DrumsSlider"); // This should not be 0 by default
                                        
                                        
                                        ProtoolsParameterFixer.setTimerCallback(function()
                                        {
                                        	for(c in Content.getAllComponents(".*"))
                                        		{
                                        			if(DrumsSlider.getValue() == 0 && c.get("isPluginParameter"))
                                        			{
                                        				c.setValue(c.get("defaultValue"));
                                        				c.changed();
                                        			}
                                        		}
                                        	this.stopTimer();
                                        });
                                        
                                        ProtoolsParameterFixer.startTimer(600);
                                        

                                        Goran Rista
                                        https://gorangrooves.com

                                        Handy Drums and Handy Grooves
                                        https://library.gorangrooves.com

                                        orangeO 1 Reply Last reply Reply Quote 0
                                        • orangeO
                                          orange @gorangrooves
                                          last edited by

                                          @gorangrooves Does this AAX issue happens in all operating systems? Windows, macOS intel & M1?

                                          develop Branch / XCode 13.1
                                          macOS Monterey / M1 Max

                                          gorangroovesG 1 Reply Last reply Reply Quote 0
                                          • gorangroovesG
                                            gorangrooves @orange
                                            last edited by

                                            @orange I've only tested it with Windows, and the above script did not do the trick, unfortunately. Maybe I didn't write it properly. I'll have to revise it.

                                            Goran Rista
                                            https://gorangrooves.com

                                            Handy Drums and Handy Grooves
                                            https://library.gorangrooves.com

                                            gorangroovesG 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            25

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.4k

                                            Posts