Expansions / Combo Box + SampleMaps
-
I need to push the list into 'sampleMaps' each time I switch expansion
Instead of
local xs = cx...
you needsampleMaps = cx..
-
@d-healey hmmmm, getting the error:
Can't assign to this expression!
-
@DanH Need more info.
-
@d-healey What would help?
-
@DanH Seeing the error message :) What is the expression that can't be assigned?
-
-
@DanH sampleMaps is a const, you can't overwrite a const.
-
@d-healey doh
-
@d-healey right, so now I need to get the factory sample maps back for the else statement, they currently stay in the expansion!
Is there a way to call 'factory' sample maps?
I've tried:
sampleMaps = Sampler1.asSampler().getSampleMapList();
-
sampleMaps = Sampler.getSampleMapList();
Doesn't that work?
-
@d-healey yes, huge thanks!
-
@DanH said in Expansions / Combo Box + SampleMaps:
@d-healey yes, huge thanks!
I just copied it from your earlier post :)
-
@d-healey still working this morning which is a relief
Back to the wrapper. I don't know where to begin doing this. Are there any examples?
-
@DanH Yes, the scripting api in the source code is mainly a collection of wrappers. Also I did a video about about it, tinkering in c++ or something like that.
-
@d-healey Thanks David. Going the route shown in the video, I want to add the function to ScriptingApiObjects.h first. There's no obvious section for the preset browser to stick it into, it's mostly effects, modulators, tables etc.
Can I put it anywhere?!
-
@DanH Catch me up again so I don't have to re-read the thread. What are you trying to do and why?
-
@d-healey no probs. I'm trying to make the Preset Browser display (rebuild?) the 'factory' user preset list when switching back from an expansion (using a combo box).
You suggested adding this function from PresetBrowser.cpp into a wrapper.
void PresetBrowser::rebuildAllPresets()
-
I thought you already had the solution for this. Enable the expansion column and give it a width of 0 to hide it?
-
@d-healey No that just hides the expansion column
Using a combo box to switch into an expansion the expansion presets load fine, but when switching back to factory (selecting no expansion in the combo box) the 'factory' user presets don't come back - it stays on the last expansion's presets.
-
@DanH Aha, let me test this on my system to see if I can find a solution