@rzrsharpeprod said in Expansions sample maps:
I have searched the forum as well as watching both of David's videos on expansions but I can't figure out what I need to do so hoping somebody can help me on here.
I have a project and have added a couple of expansions to it, I followed David's video to setup a combo box selection for the expansion as well as editing the laf of the preset browser, all that works correctly but what I can't do is get the samplemaps to populate correctly in a combo box. By extension I also can't get the samplemap to be selected in the sampler.
I have never really dabbled with expansions before and am finding it a little challenging. If somebody help me that would be great as I've been trying to figure this out for most of the week and have had varying degrees of success and failure.
To try and explain myself a bit better (as I was sitting in A&E in the early hours of this morning and didn't have access to any code)
here is the code used to populate the expansions combobox
//Expansions
const var expHandler = Engine.createExpansionHandler();
const var expansions = Engine.getExpansionList();
const var expansionNames = [];
for(e in expansions)
{
var p = e.getProperties();
expansionNames.push(p.Name);
}
const var cmbExpansions = Content.getComponent("cmbExpansions");
cmbExpansions.set("items", expansionNames.join("\n"));
inline function oncmbExpansionsControl(component, value)
{
expHandler.setCurrentExpansion(component.getItemText());
};
Content.getComponent("cmbExpansions").setControlCallback(oncmbExpansionsControl);
How can I do something similar but for the samplemaps that are inside the expansion so that I can build presets with them?
In the API there is
Expansion.getSampleMapList
but this give me an unknown function error and I can't see anything in the expansionHandler section relating to samplemaps so I am not sure how to call/reference them?
What I would like to do is populate the 'regular samplemap' combo box with the factory samplemaps if no expansion is selected and then populate it with the expansion samplemaps if an expansion is loaded so I can build presets using them. I can do this via an if statement once I can call the expansion samplemaps but I am falling at that previous step.
Unless I am being overly complicated and there is a much simpler solution that I am missing?
Any advice & help is appreciated as my project has ground to a halt until I can solve this issue.