HISE Logo Forum
    • Categories
    • Register
    • Login

    HISE Scripting Framework

    Scheduled Pinned Locked Moved Scripting
    25 Posts 4 Posters 5.1k 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

      Awesome! Btw, do you still need that {GLOBAL_FOLDER} redirect function - I just remembered this by looking at your repository :)

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

        I never actually got around to working with it, I've just being using absolute paths

        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

          Well, this will lead to disastrous errors on a apocalyptic scale as soon as you compile plugins :)

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

            Uh oh... tell me more!

            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 Christoph Hart

              Scripts will be embedded using the relative path from the project folder / or global folder as identification. Think of it like a big JSON object:

              "scripts":
              {
                  "{PROJECT_FOLDER}Script1.js": "onInit...",
                  "{PROJECT_FOLDER}Script2.js": "include(\"{GLOBAL_FOLDER}somethingElse.js\"); onInit...",
                  "{GLOBAL_FOLDER}somethingElse.js": ...
              }
              

              Now using absolute file paths may work, but it's pretty much undefined behaviour and can go wrong on certain OS version or under rare conditions (the other way is well tested on all platforms).

              What I can offer is the same mechanism that exists for sample folder relocation: a file in the "real" GlobalScript folder (the %APPDATA%/HISE/GlobalScriptFolder) called LinkWindows / LinkOSX that contains the path to the actual folder (in your case the repository root folder) and HISE will resolve this during development as well as when compiling.

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

                Ah I understand now. Yes that would be a very good solution I think.

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

                1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon
                  last edited by

                  Took a quick look on GitHub. Very good work Dave, can I suggest that one of your videos covering how to deploy this in the development process would be really useful.

                  HISE Development for hire.
                  www.channelrobot.com

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

                    Once I've cleaned up the code a little and added more comments I'll do a little video.

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

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

                      I've added a bunch of Sublime Text 3 Snippets for HISE to the repo - I'm not sure I'll be adding any more as I'm pretty much doing everything directly in HISE now, if you have some snippets you'd like me to add to the repository just let me know :)

                      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

                        "What I can offer is the same mechanism that exists for sample folder relocation: a file in the "real" GlobalScript folder (the %APPDATA%/HISE/GlobalScriptFolder) called LinkWindows / LinkOSX that contains the path to the actual folder (in your case the repository root folder) and HISE will resolve this during development as well as when compiling."
                        Has this been implemented?

                        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

                          Not yet, but I'll try to do it soon. I am currently in vacation until Octobre 2nd, so I'll be offline the next days.

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

                            Enjoy your break! :)

                            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

                              Alright, I've added this feature now:

                              Tools -> Redirect script folder creates a link file in the original location %APPDATA%/HISE/scripts which points to the selected directory. From then on you can use

                              include("{GLOBAL_SCRIPT_FOLDER}MyFileInNewLocation.js");
                              

                              Exported plugins embed this script into their binary. If you want to change the location again, either delete the link file manually or choose another target directory.

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

                                The redirect doesn't seem to work on Linux, it creates a LinkWindows file that contains the correct path but it doesn't resolve when I hit compile and gives a file not found warning

                                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

                                  Time for a LinkLinux file ;)

                                  But I need to check what is the recommended location for storing persistent app data so if you know some best practices on Linux, let me know...

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

                                    Most apps seem to use a hidden folder in the home/username directory as Hise is doing now. Other put it in some obscure sub folder of the usr or etc directories, I think the home/username directory is fine, although it can look a little cluttered it keeps everything in one place.

                                    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

                                      I think I fixed it, but am too lazy to boot up my VM, compile HISE and check, so let me know if it's still broken.

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

                                        I think you broked it ;)

                                        Compiling hi_core.cpp
                                        In file included from ../../../../../HISE-master/hi_core/hi_core/hi_core.cpp:83:0,
                                                         from ../../../../../HISE-master/hi_core/hi_core.cpp:34,
                                                         from ../../JuceLibraryCode/hi_core.cpp:9:
                                        ../../../../../HISE-master/hi_core/hi_core/PresetHandler.cpp: In static member function ‘static juce::File hise::PresetHandler::getGlobalScriptFolder()’:
                                        ../../../../../HISE-master/hi_core/hi_core/PresetHandler.cpp:2253:23: error: ‘getLinkFile’ is not a member of ‘hise::PresetHandler’
                                             const File link = PresetHandler::getLinkFile(globalScriptFolder);
                                                               ^
                                        At global scope:
                                        cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’
                                        Makefile:166: recipe for target 'build/intermediate/Release/hi_core_bbc2a29e.o' failed
                                        make: *** [build/intermediate/Release/hi_core_bbc2a29e.o] Error 1
                                        

                                        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

                                          Just downloaded the fixed version. Works perfectly :) thank you.

                                          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 Christoph Hart

                                            Yeah, I should at least have tested compilation before submitting - it was broken on all OS...

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

                                            49

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            101.9k

                                            Posts