Forum
    • Categories
    • Register
    • Login

    Expansion.getSampleMapList() always empty - full expansions

    Scheduled Pinned Locked Moved Scripting
    expansionsample maplist
    21 Posts 3 Posters 450 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.
    • C
      clevername27 @David Healey
      last edited by

      @d-healey Sorry, mate - I haven't used Expansions.

      1 Reply Last reply Reply Quote 0
      • David HealeyD
        David Healey
        last edited by

        Bump, still broken

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey
          last edited by

          This seems to be due to a missing call to initialiseFromValueTree when initialising full expansions - so I assume it works for other expansion types.

          However I have some feeling in the back of my mind that there's a performance reason for not calling this for full expansions. @Christoph-Hart Any ideas or solutions?

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey
            last edited by

            Here's a PR for it.

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            Christoph HartC 1 Reply Last reply Reply Quote 1
            • Christoph HartC
              Christoph Hart @David Healey
              last edited by

              Hmm, I've deliberately deferred calling the initialiseFromValueTree() function (that's what's happening in lazyLoad() a few lines later - this might have severe implications on the startup time if multiple expansions are present.

              Usually all the data in an expansion remains unloaded until you load the expansion with a few exceptions - eg. there's a PublicIconProvider() with the sole purpose of making an image called icon.png available without loading the expansion.

              What's the use case of wanting the samplemap list of a full expansion instrument?

              David HealeyD 1 Reply Last reply Reply Quote 0
              • David HealeyD
                David Healey @Christoph Hart
                last edited by David Healey

                @Christoph-Hart said in Expansion.getSampleMapList() always empty - full expansions:

                this might have severe implications on the startup time if multiple expansions are present.

                I knew there was a reason!

                @Christoph-Hart said in Expansion.getSampleMapList() always empty - full expansions:

                What's the use case of wanting the samplemap list of a full expansion instrument?

                When a user clicks to load an expansion I want to run a check to make sure the samples are present before loading the expansion. If samples are missing I won't load the expansion and instead ask the user to redirect the samples folder.

                One of the common support requests I get is "no sound!" and it's nearly always because the samples have been moved or not installed correctly.

                What about having a script function to manually load the value tree for the clicked expansion?

                Free HISE Bootcamp Full Course for beginners.
                YouTube Channel - Public HISE tutorials
                My Patreon - HISE tutorials

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

                  @David-Healey I think the better solution would be to include a check in the expansion loading phase that aborts the loading if samples are not found. There‘s a system to handle expansion errors gracefully (eg. if the encryption key doesn‘t match) and this would be a pretty simple addition.

                  David HealeyD 1 Reply Last reply Reply Quote 1
                  • David HealeyD
                    David Healey @Christoph Hart
                    last edited by

                    @Christoph-Hart sounds good, and I'd be able to respond to this in the error handler?

                    Free HISE Bootcamp Full Course for beginners.
                    YouTube Channel - Public HISE tutorials
                    My Patreon - HISE tutorials

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

                      @David-Healey yup, with this one here:

                      https://docs.hise.audio/scripting/scripting-api/expansionhandler/index.html#seterrorfunction

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

                        Alrighty, it's pushed and I checked it in a minimal setup, but can you verify that this works in Rhapsody?

                        Also you might want to test the procedure of installing expansions to ensure that it doesn't throw a false positive there (it might be possible that the expansion gets initialised before the samples are extracted).

                        David HealeyD 2 Replies Last reply Reply Quote 0
                        • David HealeyD
                          David Healey @Christoph Hart
                          last edited by

                          @Christoph-Hart Thanks, I'll give it a try shortly and report back!

                          Free HISE Bootcamp Full Course for beginners.
                          YouTube Channel - Public HISE tutorials
                          My Patreon - HISE tutorials

                          1 Reply Last reply Reply Quote 0
                          • David HealeyD
                            David Healey @Christoph Hart
                            last edited by

                            @Christoph-Hart First try, it reported the error but then continued to load the expansion

                            if(missing1.isNotEmpty() && missing2.isNotEmpty())

                            I suspect this should be || instead of &&

                            Free HISE Bootcamp Full Course for beginners.
                            YouTube Channel - Public HISE tutorials
                            My Patreon - HISE tutorials

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

                              @David-Healey no the function is a bit weird and used at another place. If everything is fine then it returns an empty string otherwise the filename. Since we‘re checking both sample folders one of them will always return an error so we need the logical and.

                              David HealeyD 2 Replies Last reply Reply Quote 0
                              • David HealeyD
                                David Healey @Christoph Hart
                                last edited by

                                @Christoph-Hart Ah ok I get it, so the problem is for me it's still loading the expansion. I've only tested in HISE so far. I'll compile now and see if the same issue is there.

                                Free HISE Bootcamp Full Course for beginners.
                                YouTube Channel - Public HISE tutorials
                                My Patreon - HISE tutorials

                                1 Reply Last reply Reply Quote 0
                                • David HealeyD
                                  David Healey @Christoph Hart
                                  last edited by

                                  @Christoph-Hart Looks like I was mistaken. The error isn't firing. What I was seeing in the Console was errors from the Samplers telling me they can't find the monoliths after the expansion had started to load.

                                  Free HISE Bootcamp Full Course for beginners.
                                  YouTube Channel - Public HISE tutorials
                                  My Patreon - HISE tutorials

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

                                    @David-Healey hmm but that should be covered - when there is an error the entire loading process is aborted so the samplers should not be created at all.

                                    David HealeyD 2 Replies Last reply Reply Quote 0
                                    • David HealeyD
                                      David Healey @Christoph Hart
                                      last edited by David Healey

                                      @Christoph-Hart Not happening here with full expansions. I'll add some breakpoints and debug.

                                      Free HISE Bootcamp Full Course for beginners.
                                      YouTube Channel - Public HISE tutorials
                                      My Patreon - HISE tutorials

                                      David HealeyD 1 Reply Last reply Reply Quote 0
                                      • David HealeyD
                                        David Healey @David Healey
                                        last edited by

                                        @David-Healey Hmm I must have messed up my merge somewhere because even though I have that commit in my branch history that whole section is missing...

                                        Free HISE Bootcamp Full Course for beginners.
                                        YouTube Channel - Public HISE tutorials
                                        My Patreon - HISE tutorials

                                        1 Reply Last reply Reply Quote 0
                                        • David HealeyD
                                          David Healey @Christoph Hart
                                          last edited by David Healey

                                          @Christoph-Hart Found it, there was some merge issue.

                                          It's not working correctly though. The callback doesn't seem to fire. I put Console.print in there but it never runs.

                                          The expansion seems to be kind of half loaded. If after triggering the error I hit compile in my script, I'll get some errors about files not being found and my Interface won't render properly as if it's trying to load another project (the expansion) but is missing some files.

                                          By the way, in the next version of Rhapsody I plan to go back to using hr files instead of the zips, so you might want to drop that mode before HISE 5.

                                          Free HISE Bootcamp Full Course for beginners.
                                          YouTube Channel - Public HISE tutorials
                                          My Patreon - HISE tutorials

                                          1 Reply Last reply Reply Quote 0
                                          • David HealeyD
                                            David Healey
                                            last edited by

                                            Doesn't seem to trigger any issues when installing an expansion, but since the error handler isn't triggering anyway it could just be being masked.

                                            Free HISE Bootcamp Full Course for beginners.
                                            YouTube Channel - Public HISE tutorials
                                            My Patreon - HISE tutorials

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

                                            25

                                            Online

                                            2.1k

                                            Users

                                            13.2k

                                            Topics

                                            114.6k

                                            Posts