Sample map Expansion Tutorial
-
@bwsounds I don't think the expansionCallback is triggered when you set the currentExpansion to
"". You should test it to see if that is the case. -
@d-healey
humm, still having the same issue. -
@bwsounds Need to see some code to know what you're doing. Does the expansion callback trigger?
-
@d-healey
I removed the "currentExpansion to" but The factory samplemaps still wont populate in the combobox after previously selecting an expansion.// // // E X P A N S I O N // // // const var expHandler = Engine.createExpansionHandler(); const var expansions = expHandler.getExpansionList(); expHandler.setAllowedExpansionTypes([expHandler.FileBased, expHandler.Intermediate, expHandler.Encrypted]); const var expansionNames = []; expansionNames.push("FACTORY"); for(e in expHandler.getExpansionList()) expansionNames.push(e.getProperties().Name); const Sampler1 = Synth.getSampler("Sampler1"); const list1 = Content.getComponent("list1"); list1.setControlCallback(onlist1Control); const var namesExp = []; var sampleMaps = Sampler.getSampleMapList(); var sampleMapsed = Sampler.getSampleMapList(); inline function newcombobox(newExpansion) { if(isDefined(newExpansion)) { local cx = expHandler.getCurrentExpansion(); sampleMaps = cx.getSampleMapList(); sampleMapsed = cx.getSampleMapList(); local expansionProps = cx.getProperties(); local expName = expansionProps.Name; list1.set("items", ""); list1.set("items", sampleMapsed.join("\n")); } else { sampleMaps = Sampler.getSampleMapList(); list1.set("items", ""); } } expHandler.setExpansionCallback(newcombobox); newcombobox(undefined); inline function onlist1Control(component, value) { if (value > 0) { local sampleMap = component.getItemText(); if (sampleMap != "") Sampler1.loadSampleMap(sampleMap); } } list1.set("items", sampleMaps.join("\n")); list2.set("items", sampleMaps.join("\n")); -
Does the expansion callback trigger when you deselect the expansion and return to the "factory" setup?
-
@bwsounds You're selecting expansions / factory etc through the preset browser, right?
-
@danh He has a combobox
-
@d-healey said in Sample map Expansion Tutorial:
Does the expansion callback trigger when you deselect the expansion and return to the "factory" setup?
yep
@danh said in Sample map Expansion Tutorial:
You're selecting expansions / factory etc through the preset browser, right?
originally yes, but i switched to a combobox as I thought it would help me with this issue.
-
@bwsounds In your expansion callback you are checking if
newExpansionis defined, when you revert to the factory setupnewExpansionwill be""which is also defined, so you won't hit theelseclause. -
@d-healey
ahh makes since. -
@d-healey @DanH
ok thank you guys for your help, last question.Does if make a difference whether I use a expansion install script to install the expansions or just add a button to the interface that opens up a browser window to the expansion folder and let the user drop the expansion in there?
-
@bwsounds said in Sample map Expansion Tutorial:
last question.
I like your optimism ;)
@bwsounds said in Sample map Expansion Tutorial:
Does if make a difference whether I use a expansion install script to install the expansions
Are you referring to the built in expansion installer function for .hr files?
-
@d-healey said in Sample map Expansion Tutorial:
I like your optimism
haha

@d-healey said in Sample map Expansion Tutorial:
Are you referring to the built in expansion installer function for .hr files?
yes, do I NEED to do that for expansions?
-
@bwsounds I think you can roll your own installer as long as everything goes in the right place. But you won’t be able to install from your plugin.
-
@bwsounds said in Sample map Expansion Tutorial:
do I NEED to do that for expansions?
No, but it helps