HISE Logo Forum
    • Categories
    • Register
    • Login

    Load JS via comboBox in UI

    Scheduled Pinned Locked Moved General Questions
    7 Posts 3 Posters 307 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.
    • hisefiloH
      hisefilo
      last edited by

      Hi guys, is there a way to load an external .js on runtime file via a comboBox ? On the following snippet Script1.js or Script2.js should be loaded into ScriptProcesor1. Any clue?
      (just like loading a samplemap but for js)

      HiseSnippet 774.3oc4V0saSCCE1tqFs1AHFBItMWtIMlZ1OLj3BJ8OTg0sJxXh6l7RbWMKwNJwYrJDR7fvCCOR7F.GmjljBQUkf3JxU47cNG6Oe9wGONPZyBCkAHbiyl4yP36RrlITS6NkxEng8P36SFQCUr.iDnNy7oggLGDFu1qz.3F0Qwee+EcntTgMKGBgNWxsYGy83pbzwseC20c.0gcF2qf0GzdnsTzU5Ji.9rFoExmZeM8J1ITsY0HH7c56vUx.KEUwBQ35cjNyrlJ+nHw9y4g7KcYZASjErPIvCjtNZFq+G0cJ20Y77ycHBVkw4Qg0RhBOhLh6vyvyiFOHVgQtGEiG3ZKidlUjd0JPu5IzaShkc.2WkqQysG9qnlKvtDkH7WIFShD1JtTXHEmHUrSEascyO0rQyO272TMYRo55JEp.oqKKnT05DavxbbKQj2krfcLtg5FwxLDNgKFB2X0BgPcihITELTJFJ3pS8YYxImz4HsPYGvhP4mqhnwGmRLKGJOGZVRND0MgeveuaXOphBoUbJFXmOKPw0mVbO1MP+RRRtAoGK7ZkzG5XVwJfMHCg0LXBEZBKK0+MR5ltqG8Z1f.PHygsNb+i1wXu8Ob6m+eX4Qw72+3RkkUdjTU.lClphSzOHMQ2U5cori7VD2QmmmKZhhiPEtxsckJwz154KEZVfWeE25ay11uLp8rbNbdaOJnifqABbEyC12GmtXl69gvl4+hTra0iFHGKoNFuND4OOtLzozazJoW.tSV5D4RUKdQsd5TpBn1Zg9AcQuHjqlUb50e8s2k14uhzcSxXtxdZ47sVI7UOXXk4aqJw2zYg2izexDlsJmr0ICdeUG78GPk2JiTbwUinp.ttb5jHOK3oA1LfIBAyMbdIVpbKsrNxXwDNwB+.9RUZpkwoJMmqD4QsCjWXmzzom1tdLBvIQ7iNZ.u9AjMx5yHjV61B4AOB3Baacn3I.2K2m8pfO6WAeNnB9bXE74oUvmipfOOao9ne+0KiTRuj1D.Xb+366v39BJTkEWQh9IfU.Mek
      
      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by d.healey

        I don't think what you want is possible. Tell me more about the goal you want to achieve and we can figure out the best way to do it.

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

        hisefiloH 1 Reply Last reply Reply Quote 0
        • hisefiloH
          hisefilo @d.healey
          last edited by

          @d-healey LOL! just following your directions about how to ask for help on forum. You said "Post a snippet"....... I posted a Snippet :P

          What I want to do is to load large js code files (like 10.000 lines each case) allowing user to switch between them.
          Those .js handles sinewave module data basically.

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

            @hisefilo I edited my post before you replied, now only me and you know the secret ;)

            Ah I get it. You can load JSON files into HISE so that might be a better solution. Another option which might work is to have the scripts pre-loaded into two MIDI processors and use the menu to bypass/unbypass them.

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

            hisefiloH 1 Reply Last reply Reply Quote 0
            • hisefiloH
              hisefilo @d.healey
              last edited by

              @d-healey yes! The bypass option was my first attempt. Initialization with 4 o 8 script processor with 10.000 lines each is a problem. Will investigate json thing

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

                @hisefilo Another option is to use JSON objects in a separate file and include them in your main script. So there won't be any need for loading or bypassing, the data will just be available whenever you need it, and you combo box can enable the use of the correct data for the selected option. I use something like this for setting up articulations and sample maps for my multi instrument projects.

                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 this is the best option - put them into an .js file that will be included (and embedded) into the plugin - the other way requires your installer to put some js files at a certain location which is another source of issues.

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

                  52

                  Online

                  1.7k

                  Users

                  11.7k

                  Topics

                  102.1k

                  Posts