Expansions / Combo Box + SampleMaps
-
Finally getting round to looking at expansions.
In my project I use a combo box where the user can flip between different sample maps. This system breaks when inside an expansion.
Can I point a the combo box to the expansion's sample maps? Potentially I might need to use a second combo box for this purpose.
Any help would be hugely appreciated.
-
@DanH said in Expansions / Combo Box + SampleMaps:
Can I point a the combo box to the expansion's sample maps?
Yes
-
@d-healey Thanks Dave. I assume I do this via scripting? Where it's beginning to hurt my head is switching between factory and expansions (or multiple expansions). Does the expansion use it's own script? i.e can I point the combo box at the expansion only when that expansion is active?
(I have read the docs but I did find it confusing!)
-
@DanH Did you watch my expansion video? It's slightly out of date but contains some useful info.
I assume I do this via scripting?
Yes
Does the expansion use it's own script?
Nope.
I have read the docs but I did find it confusing!
Maybe don't use expansions for now
can I point the combo box at the expansion only when that expansion is active
Yes, you can do that in the expansion callback
-
@d-healey thanks!
-
@d-healey Very useful video, thank you. Was this made before the Expansion column was available in the Preset Browser?
I'm undecided as to whether I want to use this method to browse expansions and may opt for your combobox / buttons method - does it still work? (Perhaps I'm doing it wrong if so!).
My second question is if your have a combo box to select the expansion, how is the factory content accessed?
-
@DanH said in Expansions / Combo Box + SampleMaps:
Was this made before the Expansion column was available in the Preset Browser?
Yes. And before the expansion handler and a lot of other new things. BTW last time I checked the docs were out of date too, you don't need to specify the encryption key inside the script.
My second question is if your have a combo box to select the expansion, how is the factory content accessed?
We're just talking about sample maps here so when no expansion is active you populate the list with your regular sample maps just like you would if you're not using expansions.
-
you don't need to specify the encryption key inside the script.
What do you mean by this?
We're just talking about sample maps here so when no expansion is active you populate the list with your regular sample maps just like you would if you're not using expansions.
But wouldn't the combobox be saved with a value? i.e it would always be selecting an expansion?
-
@DanH said in Expansions / Combo Box + SampleMaps:
What do you mean by this?
Looks like the docs have been updated so it doesn't matter :)
But wouldn't the combobox be saved with a value? i.e it would always be selecting an expansion?
Is the combobox used to select expansions or used to select sample maps?
-
@d-healey Expansions, I'm following your video for now (sorry I see how that's confusing with my previous messages!).
I will also be using a combo box to select sample maps, but will come to that later :)
-
I'm following your video for now
Be careful, it's out of date so there are probably better ways to do things (I'd use the preset browser column).
If you want to use a combo box add an entry to select "no expansion" and when that's enabled you can use expHandler.setCurrentExpansion("") to go back to your factory project's data.
-
@d-healey I'm just not convinced by the layout of the expansions column in the preset browser. Feels weird that it's on the left.
When I change Expansion at the moment the presets don't change, they stay on Factory
-
@DanH said in Expansions / Combo Box + SampleMaps:
When I change Expansion at the moment the presets don't change, they stay on Factory
Have you setup an expansion handler and setup your project preferences correctly for expansions according to the docs?
-
@d-healey What do you mean by 'handler'? I created two expansions using the system in the sampler window, they're all fine and populated with the right folders etc and show up in the combo box and in the preset browser.
These are the only settings I've changed in Prefs:
Am I right in thinking we no longer need to set flags?
PS - if I use the Preset Browser to navigate the expansions the presets appear like normal, just not using the combobox method
-
@DanH said in Expansions / Combo Box + SampleMaps:
Am I right in thinking we no longer need to set flags?
Nope
@DanH said in Expansions / Combo Box + SampleMaps:
What do you mean by 'handler'?
Read the docs - https://docs.hise.audio/working-with-hise/project-management/expansions/index.html
Make sure you read all of the sub categories too.
-
Make sure you read all of the sub categories too.
I have but I'm still not sure what you're referring to
-
@DanH Did you use the tutorial projects provided in the docs?
Also there's more docs :D https://docs.hise.audio/scripting/scripting-api/expansionhandler
-
@d-healey ahaaaaaaa.... Merely typing 'Expansion' into the Docs search does not reveal any of the handler apis lol
Ok thanks for this, lots more to chew through :thumbs_up_light_skin_tone:
EDIT - Ok we're getting somewhere now!
-
If you want to use a combo box add an entry to select "no expansion" and when that's enabled you can use expHandler.setCurrentExpansion("") to go back to your factory project's data.
So if I'm using
const var expansions = Engine.getExpansionList();
(which is preferable to writing a static list manually), how would I add the 'no expansion' entry to the list?
-
@DanH said in Expansions / Combo Box + SampleMaps:
So if I'm using
const var expansions = Engine.getExpansionList();You won't be using that ;) You'll be using expHandler.getExpansionList(). Go through the tutorial projects.