Expansions / Combo Box + SampleMaps
-
@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.
-
@d-healey Righto, but I think my point is roughly the same:
expHandler.getExpansionList() creates a predefined array. Can it be further edited?
-
@DanH Of course, it's just an array like any other.
-
@d-healey Morning!
I've got the project more or less working for switching between expansions. The Preset Browser updates with the right presets from each expansion. However, when I don't select an expansion (i.e go back to 'factory' presets), the Preset Browser doesn't update and shows the last expansion selected.
Is there a command to populate the preset browser with the 'factory' presets?
-
@DanH It should happen automatically. How many columns are in your preset browser?
-
@d-healey I'm using a combo box to switch between the expansions. I don't want the column in the preset browser, but it's there for now and works fine when switching between expansions and back to factory in the browser itself (just not the combo box)
-
@DanH I see. I think that feature of going back to the "factory" presets must be unique to the preset browser. Have a look in the source code and see where it happens. If it's straightforward it should be pretty easy to translate into a scriptable function.
-
@d-healey Ok, found a couple of contenders. Out of curiosity though, you mentioned in your expansions video that Christoph helped you implement a function whereby the Preset Browser would update itself when switching between expansions (23:20). This is kind of the reverse!
Also the instrument you showed as an example in the video used buttons to switch between expansions. Did you go in favour of the Preset Browser Expansion Column route in the end?
-
Did you go in favour of the Preset Browser Expansion Column route in the end?
Yes, I don't think that existed when I made the video.
-
@d-healey ok thanks.
So I'm looking in PresetBrowser.cpp line 616 and 691 as places of interest...
I've just realised that if I don't have the Expansion Column enabled in the Preset Browser then the presets won't switch at all when selecting expansions with the combo box (but I can set the column width to zero so I don't have to see it)