Setting the Folder for SampleMaps and Samples?
-
Does anyone know how to hardcode the folder path for SampleMaps and for Samples in a script? (I'm starting with one of the folders defined in FileSystem, and drilling down from there.) Cheers.
-
Sample maps are embedded in the plugin.
The samples location can't be hardcoded, it's taken from the LinkOSX/LinkWindows file (I wonder why it's not just called Link...)
You can use
Settings.setSampleFolder()
to change it. -
@d-healey said in Setting the Folder for SampleMaps and Samples?:
Settings.setSampleFolder()
Thank you, as always. Do you also know how I might specify the location for SampleMaps?
-
@clevername27 they're embedded in the compiled binary, there is no external location for them
-
@d-healey Awesome - thanks.
-
-
-
@d-healey Sorry to bother you again. I seem to be having trouble setting the location of the Sample folder (or I don't know what that means).
In my example, the samples for each SampleMap are in a different directory. (A corresponding MIDI file is there, too.) I can load the MIDI files from this directory, using the same code as below (except the last step is to load into a MidiPlayer, of course.) But the SampleMap doesn't seem to stick? Thank you.
-
@clevername27 once the samples are converted to monoliths they will all be placed in the root of the samples folder in your project.
-
@d-healey Understood. I wish to tell HISE where the samples are in the compiled plugin (instead of reading them from the SampleMap). It seems like this would need to be possible, or the user couldn't move their samples? I've been following this thread…
https://forum.hise.audio/topic/8971/method-for-detecting-whether-the-samples-were-found/6
-
@clevername27 If you load a sample map HISE will look for the samples within that sample map in the monoliths inside the samples folder specified in the Link file, you don't need to do anything in your script for this. If the samples are moved, and the Link file is updated they will still be found.
-
@d-healey Ah, I understand. Cheers, mate.
-