HISE Logo Forum
    • Categories
    • Register
    • Login

    Can't Load Samplemaps After Changing Directory?

    Scheduled Pinned Locked Moved Unsolved Scripting
    9 Posts 2 Posters 248 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.
    • clevername27C
      clevername27
      last edited by clevername27

      I'd really appreciate som help here…having a rough time with this. My code to do this was running fine, but I refactored a bunch of seemingly unrelated other stuff, and now it doesn't seem to work in the compiled plugin.

      It works inside HISE. And in the compiled version, it prints the name of both the sample directory and the SampleMap correctly (same as when it's running inside HISE).


      I change the sample directory:

      // Change the location of the Sample folder (by creating a Link file).
      Settings.setSampleFolder(global_prismIntermediatesFolder);
      

      And that creates a LinkOSX file with the correct string:

      /Users/shaft/Downloads/PRISM/Dreams.prism.bundle

      Then I call this, which seems to be necessary for some reason:

      // Reload samples using the new Sample folder location.
      Engine.reloadAllSamples ();
      

      And finally, I load a SampleMap:

      mySampler.loadSampleMap(global_activeSampleSet);
      

      But nothing seems to happen.

      Specifically, the SampleMap loading broadcaster receiver doesn't fire.

      Is there any way to get information about an internal error that might have been thrown or something?

      Thank you for any help here. This one is killing me. 🤪

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

        @clevername27 said in Can't Load Samplemaps After Changing Directory?:

        And that creates a LinkOSX file with the correct string:

        Where?

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

        clevername27C 1 Reply Last reply Reply Quote 0
        • clevername27C
          clevername27 @d.healey
          last edited by clevername27

          @d-healey

          /Users/shaft/Library/Application Support/my_plugin_company/my_plugin_name

          c70cfaa9-034d-4082-be9f-e2969f9678b2-image.png

          (I forgot to mention that works inside HISE.)

          d.healeyD 2 Replies Last reply Reply Quote 0
          • d.healeyD
            d.healey @clevername27
            last edited by

            @clevername27 That's only used by the compiled plugin. If you're working in HISE then it's going to read from the Samples folder within your project folder - you can redirect it (I think there's a way to do it through project preferences).

            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 @clevername27
              last edited by

              @clevername27 said in Can't Load Samplemaps After Changing Directory?:

              (I forgot to mention that works inside HISE.)

              Oh so the problem is only in your compiled project? Did you try removing and readding the plugin instance (or restarting the standalone application if that's what you've made) after relocating the samples?

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

              clevername27C 1 Reply Last reply Reply Quote 0
              • clevername27C
                clevername27 @d.healey
                last edited by clevername27

                @d-healey Thank you - I did, same result. The weird thing is I've run this code for over a year, and everything worked fine. It's been torture-tested by dozens of people, and I've refactored everything many times.

                But when I refactored elsewhere in the programme, this time, I must have done something? I'm also doing every type of file error-check I can think of, and all that says it's fine. I should also mention the specific issue is that the SampleMap broadcast receiver isn't firing (in the compiled version).

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

                  @clevername27 said in Can't Load Samplemaps After Changing Directory?:

                  I should also mention the specific issue is that the SampleMap broadcast receiver isn't firing (in the compiled version).

                  Was it working before your refactor?

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

                  clevername27C 2 Replies Last reply Reply Quote 0
                  • clevername27C
                    clevername27 @d.healey
                    last edited by clevername27

                    @d-healey Yeah - so you think I could just work backwards. But for whatever reason, and I know this sounds crazy, that doesn't work. If I start with the project that has the refactored code base, and comment out every line of code, and just put in the code from the working version…it still doesn't work!

                    1 Reply Last reply Reply Quote 0
                    • clevername27C
                      clevername27 @d.healey
                      last edited by clevername27

                      @d-healey I'm building the working one again just to check my sanity.

                      UPDATE: It works. Somehow, lol.

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

                      29

                      Online

                      1.7k

                      Users

                      11.8k

                      Topics

                      102.3k

                      Posts