HISE Logo Forum
    • Categories
    • Register
    • Login

    Confused about Exporting/Installing Expansions

    Scheduled Pinned Locked Moved General Questions
    15 Posts 2 Posters 384 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.
    • bendursoB
      bendurso
      last edited by

      I'm a bit confused about exporting an expansion and how to install it.

      My goal is to use the encrypted format.

      I have a project in HISE that includes an expansion. First, I compile the plugin. Then, to export the expansion, I go to Export → "Export Project as Full Expansion" and select HXI Full Instrument Expansion.

      This generates a file called info.hxi in the project folder, which I understand to be the installer file.

      To install the expansion in the compiled plugin, I'm using:

      ExpansionHandler.installExpansionFromPackage(var packageFile, var sampleDirectory);
      

      Where:

      • packageFile is the .hxi file.
      • sampleDirectory is the location where the samples should be extracted (I understand is an empty folder to extract the samples).

      However, the installation isn’t working. The console returns "The sample directory does not exist". What am I doing wrong in the process?

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

        @bendurso You don't want to use Full Expansions. Follow the instructions here - https://docs.hise.audio/working-with-hise/project-management/expansions/encrypted_expansion.html#expansion-types

        The package files should be a hr1 file.

        Link Preview Image
        HISE | Scripting | ExpansionHandler

        A wrapper object around the global expansion manager

        favicon

        (docs.hise.dev)

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

        bendursoB 1 Reply Last reply Reply Quote 0
        • bendursoB
          bendurso @d.healey
          last edited by

          @d-healey Thanks! Yes, I’ve read those instructions. But how do I export the expansion to .hr1?

          Does the .hr1 file compress all the folders within the expansion (samples, images, etc.)?

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

            @bendurso said in Confused about Exporting/Installing Expansions:

            But how do I export the expansion to .hr1?

            Export >> Package Sample Monolith Files

            Does the .hr1 file compress all the folders within the expansion (samples, images, etc.)?

            It compresses the hxi and the samples - the hxi should contain the images I think.

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

            bendursoB 1 Reply Last reply Reply Quote 1
            • bendursoB
              bendurso @d.healey
              last edited by bendurso

              @d-healey Nice thanks, I was missing that part. Now I compiled to hr1 with the hxi included. And I'm trying to install a hr1 expansion but still the console returns:

              The sample directory does not exist
              

              I'm using FileSystem.browse to select the .hr1 and if I print to console, it prints an object (I think is ok).
              And if print the directory it's: /Volumes/Ben/Raizes

              Is there something wrong here?

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

                @bendurso What are you passing for the sample directory?

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

                bendursoB 1 Reply Last reply Reply Quote 0
                • bendursoB
                  bendurso @d.healey
                  last edited by

                  @d-healey This:
                  /Volumes/Ben/Raizes

                  Just an empty folder.

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

                    @bendurso But how are you passing it to the function?

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

                    bendursoB 1 Reply Last reply Reply Quote 0
                    • bendursoB
                      bendurso @d.healey
                      last edited by bendurso

                      @d-healey Oh, first I store the location in a json.

                      Then I import the json and add the location in the inline function

                      inline function InstallPackage()
                      {
                          local SampleFile = FileSystem.getFolder(FileSystem.AppData).getChildFile("sample_folder.json");
                          local SampleObject = SampleFile.loadAsObject();
                          local DirectoryName = SampleObject.SampleFolder;
                          Console.print(DirectoryName);
                          expHandler.installExpansionFromPackage(selectedInstrumentFile, DirectoryName);
                      }
                      
                      d.healeyD 1 Reply Last reply Reply Quote 0
                      • d.healeyD
                        d.healey @bendurso
                        last edited by

                        @bendurso I don't quite follow what you're doing.

                        You should ask the user where they want to install the samples, then pass that file object to the installExpansion function.

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

                        bendursoB 1 Reply Last reply Reply Quote 0
                        • bendursoB
                          bendurso @d.healey
                          last edited by

                          @d-healey I'm actually using this method, to store the location for future instruments. This way the user does not have to choose the location of the samples each time.

                          The error could be related to this? The output of the location looks the same..

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

                            @bendurso You need to pass the file object to the function - not the path.

                            Link Preview Image
                            HISE | Scripting | ExpansionHandler

                            A wrapper object around the global expansion manager

                            favicon

                            (docs.hise.audio)

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

                            bendursoB 1 Reply Last reply Reply Quote 1
                            • bendursoB
                              bendurso @d.healey
                              last edited by

                              @d-healey Oh, hehe, thanks! I was converting the result to a string, which was causing it to fail. Now there's no error.

                              However, I think there’s an issue with exporting the expansion since it’s not being installed properly.

                              First, I export "Project as Full Expansion" to generate the .hxi file (which should include expansion images, audio files, etc.). Then, I export using "Package Sample Monolith", selecting the expansion and the previously exported .hxi file.

                              Is this the correct method? The resulting .hr1 is not installing the expansion. No error in the console now.

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

                                @bendurso said in Confused about Exporting/Installing Expansions:

                                First, I export "Project as Full Expansion

                                You are not using full expansions, so don't do this.

                                Follow the documentation

                                a6c7b2a2-c645-44ea-8178-8f010646346c-image.png

                                Link Preview Image
                                HISE | HISE | Encrypted Expansions

                                A overview over the encrypted expansion modes

                                favicon

                                (docs.hise.audio)

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

                                bendursoB 1 Reply Last reply Reply Quote 1
                                • bendursoB
                                  bendurso @d.healey
                                  last edited by

                                  @d-healey Ooh, I had read that part but since I had not found that section in Hise I omitted it. I finally found it and now it works fine! Thank you :)

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

                                  20

                                  Online

                                  1.8k

                                  Users

                                  12.0k

                                  Topics

                                  104.1k

                                  Posts