HISE Logo Forum
    • Categories
    • Register
    • Login

    Restoring properties with DAW session

    Scheduled Pinned Locked Moved Solved General Questions
    sessionrestore
    42 Posts 7 Posters 2.5k 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.
    • d.healeyD
      d.healey @Christoph Hart
      last edited by

      @Christoph-Hart :D I think I'll stick with the previous hack then

      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        Turns out the hack doesn't work properly, but I found a solution to the problem I was having with isInternalPresetLoad.

        Here is the working version:

        HiseSnippet 1183.3ocsVslaabCDlqr21JkzlFfb.15eDHC3XnGN1Isnvx5UpPrcDrbbKPPQ.8tTRDdWxEjbsiRfKJJxAoGk96dKxMn2f1gK2WxVN0UnY+gD37MO93vgyvgBtKQJ4BjU4imERPV20dzLlZZmoXJCMnKx5A1TlhHXX+gBhjnNlHUn1yBwRIwCYYsxyzZZUdUT72esaarOl4RxEgPmvotj8oATUtzgsdN02uO1ibLMnf1a0ZfKm0g6yi.VshcMTH18L7DxgXsZkrQVeVOOphKFovJhDYsZat2rQS4WvL5eBURO0mnWTGMBbjQbetumlwZonNSo9dCS28RD3kg44hUL4hGXe.0ilIOOm70w.N4VTLeXUZd5sxbzqdQ5Uq.8V.krJPoUMT591ibEzPUNhlO2wdf9LZLFR6EohQWToGUxtCGzfo1L.eFou.VjYQ0sqUaCG3m0+tJUDjINmw3mdB1Oh.qgiBoxIJbpy26ziMgxHa5JHvF6kRhvTP7CXlmOQTc8L0OGKbdN3j5fQowcBQ0gGDxYvhpqEitl1Bv0aBNAbUGru+ovQc0wQLWEkypFF6+tXEd8JuqRYG5Xmpei1.pbvb0j6ywdUWecPkxYjGhcbTzQNVflfWVLjbo5lhYepO4VESmG9PGprKYLjY7plEbCWLwWlF+bzXhjFRGN6Pth7BV03HV4xJNWEZ73EhoysBtebxeAv56UhOlgUYQAmRDa.GXZVkpHTrMeEr8MWAW7Blq4ntfhb1.FU8hPB6lt1gRpOzU6IrBTUEWq+UI05i7odDAhBkzetcbNEES3jdF+9y9vetK5kCz0IotA7HDkPhPQ0a.qtjygNPlqPks6Rjmo3gPyjrRRXS9uFz2j0j5O7aMKui0uzRpHginuMkQs9vae+tnB99Npj9IFe22miUT1jigpr3HbO6hhJFI3aVwEWP8TSy4wu0ZJgNYZda0e87VI6eyl8d1lp01B9EvMVzoSR6rdW6spuUymtSilOtAhpHAE.Z7jc19oM1oQ8B.MLGxwY4Ruuj86p33rl9rdD9bR6HkhyV6acThHxFoH8dSHlIgRN4dRvIQAZMFi8k4pD2TVrXy0k9xq4Snxzn9bP4hgKKv9EvpWKyn877VbHNhvfoJKFqKwmntAr93y4BH2nGUUDKgYCfcsGoMW.6s41xGFEXRDZx2LVjY8OpOWOBJA3.vq.4NN01r4U913+nbP7OGGi8oR0dPa6rbSRD1XQ+kYkgYGwuXH1yCpMus1MhfEtSaiEs4QLO8N8UFfC3hj74UQxqgtJRZl9ZnUtDdCw0lOBSl4dQ9X07iq0uQIA.JGmaFotqNbbolU7ML+uMC+1Rw6aOjpbmtXNVZAbD5z8ofiIu74Ks6MdLwUkSvUs6+SeZdlC5Hdjt02AXkfBc9rgKIifFNtDH5LFwWOAxpjdVgYcM8ZcFXDg4Eu3uguDv550VIf0SAQAXWA+0tlIL52V8EwR.NwheVYY6CzqcxFsXaWayZn.3Ydu10Uu8eDL9Zw1zXIro4RXyVKgMOdIrY6kvlcVBadxG0F8Kr2KRwCLWG.AC6EO7wxpGCCUVwUgn+AHQeh7A
        
        1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey
          last edited by

          I still seem to be having issues with this. Am I going about this the wrong way?

          const uph = Engine.createUserPresetHandler();
          
          const var Knob1 = Content.getComponent("Knob1");
          
          reg knobValue;
          
          uph.setPreCallback(function(presetData)
          {
          	 if (!uph.isInternalPresetLoad())
          	 	knobValue = Knob1.getValue();
          });
          
          uph.setPostCallback(function(presetFile)
          {
          	 if (!uph.isInternalPresetLoad())
          	 	Knob1.setValue(knobValue);
          });
          
          Dan KorneffD 1 Reply Last reply Reply Quote 0
          • Dan KorneffD
            Dan Korneff @d.healey
            last edited by Dan Korneff

            @d-healey Have you check that the functions for presetData and presetFile are doing their thing first?

            I just looked at my project. I moved the function outside of the Pre/Post callback

            	userPresetHandler.setPostCallback(function()
            	{
            		setMetaData();
            	});
            	
            	inline function setMetaData()
            	{
            	    //do stuff here
            	    
            	}
            

            I wonder if I hit the same issue in the past?

            Dan Korneff - Producer / Mixer / Audio Nerd

            d.healeyD 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @Dan Korneff
              last edited by

              @Dan-Korneff The functions are being triggered correctly. Inline functions are inlined when the code is compiled anyway so I don't see that making a difference here.

              Christoph HartC 1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart @d.healey
                last edited by

                @d-healey said in Restoring properties with DAW session:

                Inline functions are inlined

                Haha, I tricked you with my deceiving naming! Inline functions are not inlined, they just use a better localized scope that doesn't allocate, but it's a function call never the less.

                d.healeyD 1 Reply Last reply Reply Quote 2
                • d.healeyD
                  d.healey @Christoph Hart
                  last edited by

                  @Christoph-Hart I've been living a lie!

                  But why my code no work?

                  1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey
                    last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey
                      last edited by d.healey

                      Ahaaaaa it's one of those problems where you don't change anything and magically it starts working!!!

                      1 Reply Last reply Reply Quote 0
                      • d.healeyD
                        d.healey
                        last edited by

                        Mystery solved. I had a default preset set in project preferences. This completely breaks the save in DAW behaviour. Removing the default preset solves the issue.

                        It would be nice to have both though. On first load we get the default preset, then after that it reverts to the regular behaviour.

                        1 Reply Last reply Reply Quote 2
                        • clevername27C clevername27 referenced this topic on
                        • whoopsydoodleW
                          whoopsydoodle
                          last edited by whoopsydoodle

                          I've been playing around with this trying to find a solution for global settings. Things like oversampling. What I would like is:

                          • When a new instance of the plugin is loaded, these controls load according to a global settings json file which I set on user control of the knob
                          • Unless! It's a session being recalled where that knob has already been set by the user.

                          So when the user clicks off something like oversampling, it will apply to that instance and any new ones loaded, unless an instance is being recalled from a saved session. I absolutely can't have it breaking recall by changing the sound when a user reloads a project.

                          Unfortunately the .isInternalPresetLoad() method seems to not work well for this. First the settings blink. For a split second it loads the value saved in the preset and it both visually and audibly jumps to that setting for a moment before jumping back to what it was before the preset load.

                          And second if a user quickly changes presets this method fails after a few clicks. I suspect it has to do with the system trying to load a next preset before it's completed things and set the finished flag. The result is that after a few rapid "next preset" clicks, my control loads the value saved in preset instead of maintaining the prior value as it's supposed to.

                          clevername27C 1 Reply Last reply Reply Quote 0
                          • clevername27C
                            clevername27 @whoopsydoodle
                            last edited by

                            @whoopsydoodle If i understand you correctly, I posted the code to do this a couple weeks ago.

                            whoopsydoodleW 1 Reply Last reply Reply Quote 0
                            • whoopsydoodleW
                              whoopsydoodle @clevername27
                              last edited by

                              @clevername27 link? would love to give it a try

                              clevername27C 2 Replies Last reply Reply Quote 0
                              • clevername27C
                                clevername27 @whoopsydoodle
                                last edited by

                                @whoopsydoodle I tried to find it, but there is no "advanced search" that I can find for the forum. You'd want to search by user (me) and then maybe "file". Perhaps there is a way to do that I do not know of.

                                d.healeyD 1 Reply Last reply Reply Quote 0
                                • d.healeyD
                                  d.healey @clevername27
                                  last edited by

                                  @clevername27 said in Restoring properties with DAW session:

                                  there is no "advanced search"

                                  Search bar at the top, hit enter.

                                  43dd303e-0c87-4490-94b6-7c6e2ce0785a-image.png

                                  clevername27C 1 Reply Last reply Reply Quote 0
                                  • clevername27C
                                    clevername27 @d.healey
                                    last edited by clevername27

                                    @d-healey Thank you, appreciated — I can't find stuff, often, with that interface. I meant something like this, which includes options on which keywords must be found, and such.

                                    f78696cd-ac49-4ece-9ea1-34e912f9337c-image.png

                                    01d7bdb2-d99f-4b79-a2c3-85030d3ce8ab-image.png

                                    d.healeyD 1 Reply Last reply Reply Quote 0
                                    • d.healeyD
                                      d.healey @clevername27
                                      last edited by

                                      @clevername27 said in Restoring properties with DAW session:

                                      I can't find stuff, often, with that interface

                                      It does provide all of those features, the interface is just different.

                                      Search in forum = category
                                      Entire post = In titles and posts
                                      etc.

                                      clevername27C 1 Reply Last reply Reply Quote 0
                                      • clevername27C
                                        clevername27 @d.healey
                                        last edited by

                                        @d-healey How do I specify phrases that must be found?

                                        d.healeyD 1 Reply Last reply Reply Quote 0
                                        • d.healeyD
                                          d.healey @clevername27
                                          last edited by

                                          @clevername27 Wrap it in quotes

                                          43516872-73b3-4239-97de-0263096c99c5-image.png

                                          clevername27C 1 Reply Last reply Reply Quote 2
                                          • clevername27C
                                            clevername27 @d.healey
                                            last edited by clevername27

                                            @d-healey So it does, cheers (clicking the gear icon).

                                            d.healeyD 1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            23

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.8k

                                            Posts