How to include the samples when building the plugin?
-
@daniloprates Yes you could script a button that deletes the file, the user would still need to restart the plugin though.
It's probably more user friendly to script a custom screen where the user can select a folder. All the functions needed for this are available in the scripting API.
-
Where in the scripting API is the link file in the app data folder referenced?
If one wanted to create a button to reset the sample folder for the user if they decided to move the samples. -
@jeffd You can use the file and file system APIs to access the app data folder.
You can use
Settings.setSampleFolder()
to update the link file. -
@d-heale
ok let me try it.
thanks -
@jeffd ```
so I created a button to reset the sample folder for the user,
but it doesnt retrigger a reset for the compiled plugin. I dont get any scripting errors in HISE but I am missing something.
what could be wrong here?code_text
inline function onResetBtn(control, value) { if(value) // button is pressed { // This clears the sample folder setting Settings.setSampleFolder(""); Console.print("Sample folder has been reset. The plugin will ask for a new folder next time."); Engine.showMessageBox("info", "Please restart the plugin or reload it to set a new sample folder.", "OK"); } } ResetBtn.setControlCallback(onResetBtn);
-
@jeffd er.. doesnt that just give you an empty Link file? what you actually want in this approach is to have the link file deleted.
You'd be way better off just asking (in the plugin) for the new folder...and replacing the current Link file value.
-
@jeffd As Lindon says, to retrigger the overlay you need to delete the link file entirely, not just change the path within it.
-
@d-healey can i delete the link file via a script?
not sure i understand. -
@jeffd Yes, the file and filesystem API has what you need. Just be careful when deleting files.
-
@d-healey
isnt the link file going to be located in a different location for each operating system?Is there documentation somewhere on how to get HISE to find the path in the operating system?
-