Expansion sample map load
-
So I have a sample map in the expansions folder - the ch1 is in the default project folder...
How do I get it to load in a sampler - I've tried this:
TheSamplers[0].asSampler().loadSampleMap("{EXP::THE37SQUARE");
What am I doing wrong?
-
The syntax for sample map references in expansions is
{EXP::ExpansionName}MySampleMap
-
@Christoph-Hart OK yes sorry - I forgot - perhaps I could be more explicit:
- I am working with an external installer - not HISE based, so it will be setting up the folder structure,
I get a file telling me if a sound is an expansion, and what the expansion is called.
How do I tell it/them how to set up the structure such that it can load the samples into the users default folder(where the factory samples are located) and then I load the sample maps to a folder such that I can reference it in my plugin?
-
The samples can go in the normal sample folder without any extra measures - if you load a sample map from an expansion it will look in both the general sample folder as well as the Samples subfolder of the expansion.
The sample maps must be stored under
APPDATA/Expansions/MyExpansion/SampleMaps
if you're using FileBased expansions, but then you also need an info.xml file containing the expansion properties. -
@Christoph-Hart
Well Im definitely doing something wrong.I copied the first expansion from the tutorial to both the APPDATA Expansions folder and to my HISE Project Expansions folder, and the only thing I did in my init was this:
TheSamplers[0].asSampler().loadSampleMap("{EXP::First Expansion}First Normal");
..and its not loading.
Do need the Expansion Handler?
how do I build this info.xml file?
Do I still need to set up the expansions pre-processor definitions?
-
Do need the Expansion Handler?
No, only if you want to query the list of available expansions (but for debugging purposes it would be the next smart move).
Do I still need to set up the expansions pre-processor definitions?
No but you need to enable Expansions in the project settings (they are off by default).
how do I build this info.xml file?
It is created when you create an expansion in HISE.
-
@Lindon - OKay struggling here...
I rebuilt HISE with the EXPANSIONS preprocessor flags - that seems to offer me nothing at all.
I did this:
var expansions = Engine.getExpansionList(); Console.print(trace(expansions));
and get to see an empty array - so its not picking up the expansions...
My expansions folder in the project looks like this:
and inside there is:
expansions info looks like this:
<?xml version="1.0" encoding="UTF-8"?> <ExpansionInfo Name="First Expansion" Version="1.0.0" ProjectName="" Tags="" ProjectVersion="1.0.0"/>
-
It is created when you create an expansion in HISE.
--- how do I create and expansion in HISE?
-
No but you need to enable Expansions in the project settings (they are off by default).
Like this?
-
@Lindon ey at last!
All I needed to do was restart HISE....
-
--- how do I create and expansion in HISE?
Click the plus button in the tool bar at the bottom of the Project Directory tab.
-
@d-healey oh wow - I nearly never go there...
thanks.