HISE Logo Forum
    • Categories
    • Register
    • Login

    Add Module State to User Preset - Help!

    Scheduled Pinned Locked Moved Solved General Questions
    6 Posts 2 Posters 521 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.
    • HISEnbergH
      HISEnberg
      last edited by HISEnberg

      I am getting some inconsistent behaviour from the Engine.addModuleStateToUserPreset . I am using it to save the FX network I have loaded into my hardcoded FX. I have this same exact code in another project and it works fine. However, in my new project, for some reason it will only save the state of FxSlot1, and not any of the others.

      I investigated other parts of my code but I haven't found anything which could be overriding this function, so I am a bit stumped as to why it won't save the network state (I also tried to save them individually but it also did not work).

      const var SlotIdsPresets = ["FxSlot1", "FxSlot2", "FxSlot3", "FxSlot4", "FxSlot5", "FxSlot6", "FxSlot7", "FxSlot8", "FxSlot9", "FxSlot10", "FxSlot11", "FxSlot12"];
      
      const var fxSlotConfigurations = [];
      
      for (i = 0; i < SlotIdsPresets.length; i++) {
          fxSlotConfigurations.push({
              "ID": SlotIdsPresets[i],
              "RemovedProperties": ["bypass"],
              "RemovedChildElements": ["Modulator"]
          });
      }
      
      // Function to add an effect slot to the user preset system
      function addFxSlotToPreset(slotConfig) {
          Engine.addModuleStateToUserPreset(slotConfig);
      }
      
      // Add each FX slot configuration to the user preset system
      for (i = 0; i < fxSlotConfigurations.length; i++) {
          addFxSlotToPreset(fxSlotConfigurations[i]);
      }
      
      HISEnbergH 1 Reply Last reply Reply Quote 0
      • HISEnbergH
        HISEnberg @HISEnberg
        last edited by HISEnberg

        *Edit
        It certainly has something to do with the specific project I am working on, Engine.addModuleStateToUserPreset works fine as does the previous bit of code in other/new projects.

        *Edit 2

        I removed (commented out) every script from my project and kept a simplified form of the script on the onInit. Still the issue persists so I am wondering if I need to look somewhere else? Some more details of the project is that I am using a FloatingTile Preset Browser with only 2 columns, I have EmbedUserPreset activated. I also have two copies of this same project (different folder locations).

        HISEnbergH 1 Reply Last reply Reply Quote 0
        • HISEnbergH
          HISEnberg @HISEnberg
          last edited by

          @HISEnberg Found the solution to this and other odd behaviour I was experiencing after giving up and trying to build out my project. Started experiencing the "Sanity checked failed" , leading me to remove, and add back in all my hardcoded master FX. I suppose they continue to be quite sensitive to what version of HISE they are made with:

          Link Preview Image
          Can't find effects in DLL (Sanity check failed)

          @Onik-Sisodiya I'm not sure what your problem is, perhaps post a snippet

          favicon

          Forum (forum.hise.audio)

          Christoph HartC 1 Reply Last reply Reply Quote 0
          • HISEnbergH HISEnberg has marked this topic as solved on
          • Christoph HartC
            Christoph Hart @HISEnberg
            last edited by

            I suppose they continue to be quite sensitive to what version of HISE they are made with:

            Yes, always use the exact same source code for compiling HISE, the FX DLL and the exported plugin.

            Maybe I need to think about adding some failsafe that prevents HISE from compiling anything with another source code state than it was compiled (something like a counter that gets bumped with each commit and is embedded into the binary)...

            HISEnbergH 1 Reply Last reply Reply Quote 0
            • HISEnbergH
              HISEnberg @Christoph Hart
              last edited by

              @Christoph-Hart Yes a failsafe would have been great, I only really came across the solution here by chance and with how often HISE is updated I don't doubt I will be the last to experience this issue.

              HISEnbergH 1 Reply Last reply Reply Quote 0
              • HISEnbergH
                HISEnberg @HISEnberg
                last edited by

                @Christoph-Hart Also I thought it would fix this other issue I am having but it seems to be related to something else.

                I have a few FX networks that are modulation based (auto-panner, flanger, chorus, vibrato, etc.). These networks, compiled, work fine in other projects. However in this specific project, their modulation rates keep getting tossed to the maximum on every new note.

                I really have no idea why (the ScriptFx works perfectly fine). Tracking their states in the Console shows them at the correct values. I removed any scripts I thought may be interefering with them. Are there any other modules (Midi, FX) or nodes in scriptnode that could cause this issue (maybe the converter, core.oscillator or temposync)?

                1 Reply Last reply Reply Quote 0
                • HISEnbergH HISEnberg referenced this topic on
                • First post
                  Last post

                28

                Online

                1.7k

                Users

                11.8k

                Topics

                103.1k

                Posts