.ch1 samples stop working in compiled VSTi (did i miss something?)
-
@d-healey Honestly the expansions only worked without issues when set to AppData folder:
This custom path did not work on my mac expansions.
I have a couple questions:
- Does this "Locate Samples" menu work with expanions?
- We use expansion only - so i assume custom path looks for all exp. content?
- What is the "recommended way" of installing & moving expansions on user side?
Thank you in advance i should probably know more about expansions but i have worked with "baked in" samplemaps most of the time and this is new for me :)
-
@Straticah said in .ch1 samples stop working in compiled VSTi (did i miss something?):
Does this "Locate Samples" menu work with expanions?
I'm not sure, it's been a long time since I used expansions. I think each expansion has its own Samples folder and own Link file.
-
S Straticah has marked this topic as unsolved
-
@d-healey This would make sense, but i have not found anything that confirms that.
If anybody can shine some light on how users can install/move expansions, this would help a ton.
-
@Straticah I just checked with Rhapsody and each expansion does have its own Samples folder. I'm not using the encrypted expansions with Rhapsody but I suspect it will be the same.
-
@d-healey Okay that makes sense - where/how does Rhapsody store and recall the locations of the users Expansion Samples? Is it custom or is HISE doing it via the the startup "overlay"?
-
@Straticah There's a link file in each expansion's Samples folder that points to the location of the samples. I create the link file as part of my expansion install process, I also have scripted a system to allow the user to update it if they move the samples to another location.
-
@d-healey I think it also looks automatically in the global sample folder when the monolith can‘t be found in the expansion folder but it‘s also been ages that I‘ve used this myself.
I definitely tried to offer both sample location possibilities so you can decide whats more convenient for you.
-
@Christoph-Hart Okay i will try to utilize the linker files and set path with them.
If it does not work maybe i can still read it and override HISE expansion search path via API.
If you have examples on how to set a custom expansion path for HISE lmk.
Will look into Rhapsody path handling aswell. @d-healey
-
@Straticah What I do is this: when the user opens the plugin for the first time, I ask them where they want to store all the samples and save that path in a JSON file.
Then, during each expansion installation, when I call expHandler.installExpansionFromPackage, I always send the samples to that folder inside a new subfolder. The file link is created automatically by this function.
If the user later wants to change the location, I provide a master configuration option for relocating samples. So I call Expansion.setSampleFolder for all the expansions and change the path of the json file. This way, the user can simply move all expansions at once.
I analyzed different approaches a while back, and this one seemed the most reasonable.
-
@Christoph-Hart said in .ch1 samples stop working in compiled VSTi (did i miss something?):
@d-healey I think it also looks automatically in the global sample folder when the monolith can‘t be found in the expansion folder but it‘s also been ages that I‘ve used this myself.
I definitely tried to offer both sample location possibilities so you can decide whats more convenient for you.
Yes I definitely need tthis facility of using the default samples link as we don't use separate folders for expansions, everything goes in the default AppData defined. Lnk folder
-
Yes an example would be great i still dont understand 100% how it works.
@bendurso I have some troubles
What works: creating a .json with external samplepath that gets saved in AppData
What does not: usingExpansion.setSampleFolder
to tell HISE the path
Link Files: The link are not reliable on mac on my end - I haveHISE_DEACTIVATE_OVERLAY=1
and tested/created the link files manually via the stock settings panel:LinkOSX file
/Volumes/WD_BLACK/Music/Fraction/Samples (all ch1 files go here)
<?xml version="1.0" encoding="UTF-8"?> <GLOBAL_SETTINGS DISK_MODE="0" SCALE_FACTOR="1.0" VOICE_AMOUNT_MULTIPLIER="2" MIDI_CHANNELS="1" SAMPLES_FOUND="0" OPEN_GL="0"/>
Sometimes the link file worked (when using the settings panel) but sometimes it does not work...
Tested different folders, paths, locations etc. no pattern yet.Edit:
I got sound when i removed all expansion content from AppData/Plugin/Expansion and pasted the LinkOSX file in my Expansion folder instead. :oWorked, link file is needed in empty expansion folder and also in AppData root folder.
Thanks for the help guys tho this was quite hard as a first timer. :)
-
S Straticah has marked this topic as solved
-
@Straticah Yeah, this is my code to install the expansions (i'm actually saving other things on that json file, so that's why I used "SampleFolder" to retrieve it from the json)
var CompletePath; inline function InstallPackage() { local parentFolder = FileSystem.getFolder("../"); local SampleFile = parentFolder.getChildFile("settings.json"); local SampleObject = SampleFile.loadAsObject(); local DirectoryFile = FileSystem.fromAbsolutePath(SampleObject.SampleFolder); CompletePath = DirectoryFile.createDirectory(InstrumentName); if (CompletePath.isDirectory()) { expHandler.installExpansionFromPackage(selectedInstrumentFile, CompletePath); } else { Console.print("Could not create the installation directory."); } }
When I use expHandler.installExpansionFromPackage, it creates the link file on expansion samples folder with the samples path. It always worked for me, and I never received a support ticket.
And then I created my own button to change the samples path on settings. This will change the sample paths for all the expansions.
inline function onbtnChangeSamplesDirectoryControl(component, value) { if (value) { FileSystem.browseForDirectory("", function(selectedFolder) { if (selectedFolder) { if (selectedFolder.hasWriteAccess()) { var path = selectedFolder.toString(0); currentSampleFolderPath = path; var notFound = []; for (e in expHandler.getExpansionList()) { var name = e.getProperties().Name; var fullPath = path + "/" + name; var folderObject = FileSystem.fromAbsolutePath(fullPath); if (folderObject.isDirectory()) { e.setSampleFolder(folderObject); } else { notFound.push(name); } } if (notFound.length > 0) { Console.print("Not found"); } else { Console.print("All sample folders updated successfully"); } } else { Console.print("The selected folder can't be accessed due to insufficient write permissions. Please choose a different folder."); } } }); } }; Content.getComponent("btnChangeSamplesDirectory").setControlCallback(onbtnChangeSamplesDirectoryControl);