How to make a sound library locator
-
How to make a sound library locator?
I think this is a very convenient thing -
@BobCat Do you mean for the samples in case they're missing and the plugin isn't detecting them?
-
No, what I mean is that after I install the sound library, double-click to run this program, which allows the plug-in to directly identify the path to the sound library.
In other words, this program can change the sound path in the file LinkWindows -
@BobCat why not put it in the product?
-
@Lindon Compared to using plug-ins to locate paths, I think this moving method is more straightforward.
-
@BobCat you are forcing the user to keep track of another exe just for changing the samples directory. Beyond the initial installation, how many times will the user need it, and once they do, will they be able to find it?
The default HISE behavior allows for detection of missing samples inside the plugin. If you don't like the look of it and the fact that the user has to restart the plugin after locating, check out the ErrorHandler API. You're looking for level errors 9 and 10. I made a similar thread not long ago.
https://forum.hise.audio/topic/8971/method-for-detecting-whether-the-samples-were-found
My final implementation includes a timer that checks for changes in the LinkFile so that when I change the sample folder in one instance, all the other instances in the session attempt a reloadAllSamples() call and, if the samples are there, remove the samples finding panel and carry on.
-
@aaronventure in the long run I hope that the installers made with the multipage creator will be used for this kind of stuff - theres an inbuilt function that automatically writes the link file to the location where you‘ve extracted the samples.
-
@Christoph-Hart Of course. Inno Setup also lets you do it with a bit of scripting seeing you already have the variable.
But if the user moves the library after install, you need some sort of mechanism for adjusting to that and the baseline is Kontakt which lets you pick a folder, it searches the entire folder and all subfolders and you can set it to use the folder you selected for all other attempts in a session, automatically correcting all missing samples no matter the developer, if you e.g. moved your entire library collection to another place.
If they load up a session with 20 instances of my instrument, I don't want them to have to close the entire project to reload the samples (your built in solution requires an instrument reload; all you have to do is call Engine.reloadAllSamples() if the folder contains the samples).