Expansion.getSampleMapList() always empty - full expansions
-
Bump, still broken
-
This seems to be due to a missing call to
initialiseFromValueTreewhen 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?
-
Here's a PR for it.
-
Hmm, I've deliberately deferred calling the
initialiseFromValueTree()function (that's what's happening inlazyLoad()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 calledicon.pngavailable without loading the expansion.What's the use case of wanting the samplemap list of a full expansion instrument?
-
@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?
-
@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.
-
@Christoph-Hart sounds good, and I'd be able to respond to this in the error handler?
-
-
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).
-
@Christoph-Hart Thanks, I'll give it a try shortly and report back!
-
@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&& -
@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.
-
@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.
-
@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.
-
@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.
-
@Christoph-Hart Not happening here with full expansions. I'll add some breakpoints and debug.
-
@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...
-
@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.