HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. Elezeid
    3. Best
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 20
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Expansion Content not loading in DAW project file?

      @d-healey

      In case anyone else should ever run into this problem here is the solution (I'm kicking myself).

      The Expansion Selector has to be higher than the sample map selector in the UI tree.
      That's it.

      That's why the minimal project worked, and that change seems to have completely fixed it in my main project.

      Thanks again for all your help. Hopefully this will help someone in the future!

      posted in General Questions
      ElezeidE
      Elezeid
    • RE: Expansion Content not loading in DAW project file?

      @d-healey

      Thanks for your willingness to help David. I just made a dummy project for testing. Here's what happened:

      Factory: 2 presets and 2 sample maps
      Expansion 1: 2 presets and 2 sample maps
      Expansion 2: 2 presets and 2 sample maps

      Exported to VST3, created a DAW project and...

      No issue. The problem is totally absent! I'm not completely certain as to why, but I suspect maybe it has something to do with where the code is in the hierarchy.

      Thanks for guiding me through this, I think I have the necessary tools to get across the finish line without pestering you any further! Just in case, here is the code for the dummy plugin.

      Content.getComponent("knbDum").setControlCallback(onknbDumControl);
      
      // The sampler references
      const var Sampler1 = Synth.getSampler("Sampler1");
      
      // The ComboBoxes for Expansions
      const var ExpansionSelector = Content.getComponent("ExpansionSelector");
      
      // The ComboBoxes for SampleMaps
      const var cmbSampleMap = Content.getComponent("cmbSampleMap");
      
      // Expansions Handler Create
      const var expHandler = Engine.createExpansionHandler();
      
      // Expansion Types Allowed
      expHandler.setAllowedExpansionTypes([expHandler.FileBased, 
                                           expHandler.Intermediate, 
                                           expHandler.Encrypted]);
                                           
      // Expansions list retrieve
      const var expansionList = expHandler.getExpansionList();
      
      
      // Extract names of the expansions
      const var expansionNames = [];
      
      // Add “Factory Content” as the first option
      expansionNames.push("Factory Content");
      
      // Add all available expansions
      for (e in expansionList)
      {
          expansionNames.push(e.getProperties().Name);
      }
      
      // Fill the Expansion ComboBox
      ExpansionSelector.set("items", expansionNames.join("\n"));
      
      // Global variable for saving the current expansion
      const var currentExpansion = -1;
      
      // Help function for updating all SampleMap ComboBoxes
      inline function updateAllSampleMapComboBoxes()
      {
          // Empty all SampleMap ComboBoxes
          cmbSampleMap.set("items", "");
          
          local actualValue = ExpansionSelector.getValue() - 1;
          
          if (actualValue == 0) // "Factory Content"
          {
              // Use the embedded SampleMaps for “Factory Content”
              local maps = Sampler.getSampleMapList();
              local mapItems = maps.join("\n");
              cmbSampleMap.set("items", mapItems);
          }
          else if (actualValue > 0 && actualValue <= expansionList.length)
          {
              // For expansion, load the SampleMaps of the selected expansion
              local exp = expansionList[actualValue - 1]; // -1 because 0-based index
              
              // Set the expansion as active
              Engine.setCurrentExpansion(exp.getProperties().Name);
              
              // Get the SampleMap list of this expansion
              local maps = exp.getSampleMapList();
              local mapItems = maps.join("\n");
              
              // Set the displayed names in all ComboBoxes
              cmbSampleMap.set("items", mapItems);
          }
      }
      
      // Callback for Expansions-ComboBox
      inline function onExpansionSelectorControl(component, value)
      {
          updateAllSampleMapComboBoxes();
      }
      
      // Callbacks for SampleMap-ComboBoxes
      inline function oncmbSampleMapControl(component, value)
      {
          if (value > 0)
          {
              // Get the SampleMap name from the ComboBox
              local mapName = component.getItemText();
              
              // Load the SampleMap into Sampler1
              Sampler1.loadSampleMap(mapName);
          }
      }
      
      
      // Set the callbacks
      ExpansionSelector.setControlCallback(onExpansionSelectorControl);
      cmbSampleMap.setControlCallback(oncmbSampleMapControl);
      
      // Initialize with Factory Content
      //ExpansionSelector.setValue(1); // Sets to first entry (1-based)
      //ExpansionSelector.changed();
      

      Thanks again! If I run into more hurdles with this issue I'll return to this thread.

      posted in General Questions
      ElezeidE
      Elezeid
    • RE: Memory leak with Engine.loadAudioFilesIntoPool

      @d-healey Sure thing. Here it is without the IRs. Feel free to throw any old audio files in there.

      Convolution -Test.zip

      posted in Scripting
      ElezeidE
      Elezeid