HISE Logo Forum
    • Categories
    • Register
    • Login

    Importing Expansions

    Scheduled Pinned Locked Moved General Questions
    9 Posts 2 Posters 346 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.
    • CasmatC
      Casmat
      last edited by

      Hey!

      I'm off to adding an import/delete expansion system in my plugin. I'd like to know how you guys manage the importation of the expansions. Basically, I'd like to have a file that the user downloads, this would be the expansion file, like "instrument.filetype". When a user presses import on the preset browser in the plugin, it'd prompt a selection of this file and import the samples/samplemaps/resources in the expansion. I'd also like to run a script in my AdditionalSourceCode folder in the expansions to set the expansion right. This is basically what David Healey did in his Rhapsody, but I'm wondering how he the whole thing works in hise, like whats in the file that the user downloads, how I can make it, and how I can try and go about this process. I'd also want to eventually put into place a encryption/license process and I saw in the docs that there's a separate .hxi/.hxp filetype which goes with that.

      Thanks!

      i make music

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

        @Casmat If you want the simplest solution you can use the built in expansion installer.

        Go to the project directory tab in the left hand side bar of HISE. And at the bottom of that tab you'll see the expansion toolbar. Click this button to encode your expansion

        24aed9c8-7be4-4e6e-a89e-4b1a65b10a95-image.png

        This will create an hxi file.

        From the Export menu you can select to export your samples as an archive, and this will display a popup. Choose HR as the format and further down you can select the hxi file you created previously.

        This will produce one or more hr files that contain the expansion data (the hxi) and the samples. You can send these to your users.

        Then with your installer system you just need to call ExpansionHandler.installExpansionFromPackage() and pass it the first hr file and the target sample directory.

        baf54e1a-b0b5-4b16-9219-4fa24392195c-image.png

        Now why aren't I using this for Rhapsody... the problem for me is this combines the data and the samples, but I often provide updates to one or the other and sometimes both. With large sample libraries I don't want my users to have to redownload multiple GB of samples for each update. So I went with a custom system using zip files (which have the .lwz extension instead of .zip to confuse Safari).

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

        CasmatC 1 Reply Last reply Reply Quote 1
        • CasmatC
          Casmat @d.healey
          last edited by

          @d-healey Amazing explanation! Thanks so much! If I did go your route since it seems logical for my use case as well, do you think it'd still be possible to have the same high level of encryption the regular HISE encoded ones are like with just zip files? I know that zip files have AES 256 encryption available which should do half the trick, but would that work with HISE in decoding it with the password and do you think it'd still work with a wordpress website for authentication (jwt auth, woocommerce license manager, etc)?

          Thanks!

          i make music

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

            @Casmat There is zero encryption with zip files. You should still be able to do the hxi to hxp encoding thing though.

            I don't know anything about encrypting files via WooCommerce license manager. I don't do that for my stuff.

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

            CasmatC 1 Reply Last reply Reply Quote 0
            • CasmatC
              Casmat @d.healey
              last edited by

              @d-healey In the docs, it says that there's intermediate and encypted level encryptions with the encrypted having user credential matching. Is the hxi the intermediate and the hxp the full encrypted?

              i make music

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

                @Casmat Yeah

                Link Preview Image
                HISE | Docs

                favicon

                (docs.hise.audio)

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

                CasmatC 1 Reply Last reply Reply Quote 0
                • CasmatC
                  Casmat @d.healey
                  last edited by Casmat

                  @d-healey Thanks! One last thing, how would removing an expansion go on the user end. I didn't see any function to remove installed expansions, or maybe I cant see 😅 . What would I need to delete to remove all traces of an expansion?

                  Edit: is it just as straightforward as deleting the .hxp file or is there more to it?

                  i make music

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

                    @Casmat Yeah just delete the files, and put lots of safety checks to make sure you don't delete the wrong files :)

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

                    CasmatC 1 Reply Last reply Reply Quote 0
                    • CasmatC
                      Casmat @d.healey
                      last edited by

                      @d-healey Thanks a ton!

                      i make music

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

                      20

                      Online

                      1.7k

                      Users

                      11.8k

                      Topics

                      102.4k

                      Posts