@Lindon said in User Specified Sample Folder per Sampler?:
FileSystem.browseForDirectory(var startFolder, var callback)
Yes, thank you. I have added this to the SampleLoadSave.js of the CustomSampleImport project. On Right Click, it opens the directory browser twice. I can select a folder but it does not load the samples in the folder or randomize the folder.
SampleDropper.setMouseCallback(function(event) { // Clear the sample on double click if(event.doubleClick) { Sampler1.clearSampleMap(); return; } this.data.hover = event.hover; // Show a directory browser on right click if(event.rightClick) { FileSystem.browseForDirectory(FileSystem.Samples, loadSample); return; this.repaint(); } });Here is how I am randomizing some components in case I need something here. I know there is a way to reduce the script, I just don't know it.
const sampleMapsRAN = Sampler.getSampleMapList(); inline function onShuffleSamplebtn1Control(component, value) { if (value) { local index = Math.randInt(0, sampleMapsRAN.length); local sampleMap = sampleMapsRAN[index]; Sampler1.loadSampleMap(sampleMap); SampleViewer1.setValue(index); SampleName1.setValue(list[index]); } }; Content.getComponent("ShuffleSamplebtn1").setControlCallback(onShuffleSamplebtn1Control);Thanks again.