HISE Logo Forum
    • Categories
    • Register
    • Login

    Connecting script processor to external files

    Scheduled Pinned Locked Moved Blog Entries
    4 Posts 2 Posters 1.6k 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.
    • Christoph HartC
      Christoph Hart
      last edited by

      externalScripts.gif

      The tree structure of HISE allows a encapsulated design and enforces a "one module per task" policy.

      However there are scenarios where you want this one task be applied at different places. If you have multiple samplers that should eg. have the same RR logic, you had to write one script, and duplicate the script processor in each submodule. However this increases the redudancy (the script code gets duplicated), and if you need to alter the behaviour, you had to change each script.

      Luckily, these times are over now. You can now tell a script processor to be connected to an external file, and it will fetch its code directly from the file and morph into read-only mode.

      1. Write a script
      2. Save the script to a file within the project folder (both compressed and uncompressed script formats are supported)
      3. Right click on the header and choose Connect to external script. Select the file you've just exported.
      4. The editor & callback tabs will disappear and it will look like a Hardcoded script. You can now copy & paste it like any other module (the clones will also reference the file).
      5. When you made changes to the file, right click on the header and choose "Reload external script" (or simply choose Tools -> Recompile all scripts so you don't have to do this for every module that uses the file)
      6. If you need to disconnect the script processor (eg. to make local changes to the script), right click on the header and choose Disconnect from external script

      If you export a plugin, it will of course embed the script into the binary / the HISE Player library package (just like with include() files)

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

        Excellent addition!

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

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

          This seems to also work with scripts that aren't in the project folder, which is great if you have a library of modules that you want to use across multiple projects, but will they be emedded in the binary on export?

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

          1 Reply Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart
            last edited by

            Yes of course. They are even embedded in a HISE Playe library.

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

            21

            Online

            1.7k

            Users

            11.8k

            Topics

            102.5k

            Posts