HISE Logo Forum
    • Categories
    • Register
    • Login

    Custom error messages

    Scheduled Pinned Locked Moved Scripting
    13 Posts 4 Posters 508 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.
    • DanHD
      DanH @tomekslesicki
      last edited by

      @tomekslesicki I think it's the Locate one but try them all one by one and see what happens.

      What do you want it to do by the way? Only display a message if the samples are missing?

      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
      https://dhplugins.com/ | https://dcbreaks.com/
      London, UK

      T 1 Reply Last reply Reply Quote 0
      • T
        tomekslesicki @DanH
        last edited by

        @DanH yeah, that’s the point pretty much. I’m trying to customize it so that it’s easier for the users and more cohesive visually. So the idea is like this:

        1. hide the original missing samples popup
        2. check if the samples are there on init
        3. if they’re not, show a panel with some help text and a button to change the samples folder

        So the only thing I need help with now is point 2 above :-)

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

          @tomekslesicki Use the file system API, along with this function to check if the samples are installed.

          6fab8f5c-673e-45be-a670-11c85c427e00-image.png

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

          T 1 Reply Last reply Reply Quote 1
          • T
            tomekslesicki @d.healey
            last edited by

            @d-healey thanks! If it’s not too much of a hade, could you please give me an example of this call in practical context?

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

              @tomekslesicki

              This will grab all the installed samples. If you want to check if any individual sample is missing you'll need to load in each sample map xml and search it for matches against the sample names.

              const sampleFiles = Engine.getSampleFilesFromDirectory("", true);
              
              Console.print(sampleFiles.length);
              

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

              T 1 Reply Last reply Reply Quote 1
              • T
                tomekslesicki @d.healey
                last edited by

                @d-healey epic, thank you!

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

                  @tomekslesicki Something that might be simpler than reading each xml is if you just have a script file that contains an array with all the sample names. The only downside is if you add/change the samples in your project you'll also need to update this array.

                  Edit: Actually there doesn't appear to be a way to access the sample map xmls once the plugin is compiled (other than by loading them into a sampler) so this array idea might be the best choice.

                  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

                    I just remembered that Christoph added an error handler object to HISE script which can probably handle this, but last time I tried it it was buggy

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

                    Christoph HartC 1 Reply Last reply Reply Quote 0
                    • Christoph HartC
                      Christoph Hart @d.healey
                      last edited by

                      Link Preview Image
                      HISE | Docs

                      favicon

                      (docs.hise.audio)

                      What's buggy there? I haven't used it for quite some time, but I'm not aware of any bugs in particular there.

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

                        @Christoph-Hart

                        https://forum.hise.audio/topic/6140/bug-error-handler-fires-on-project-open?=1673015961375
                        https://forum.hise.audio/topic/5833/hise-compatibility-with-windows-11-and-cubase-12/79?
                        =1673016009794

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

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

                        50

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        102.2k

                        Posts