Display User Filename for multiple AudioLoopPlayers
-
Hey Gang,
Ive got 4 AudioLoopPlayers, each have user drag-and-drop feature enabled. All is working well while displaying file names via Combobox of samples within the project folder. However, when I load my own sample (user sample) I cannot get the combobox to display the filename.
Below is my current bit of code I think I need to edit for this. Any help is appreciated.
allList.push("No Sample Loaded"); allIds.push(""); for(r in rootList) { allList.push(r.split("}")[1]); allIds.push(r); rootList.sortNatural(); } for(e in expansionList) { for(af in e.getAudioFileList()) { allList.push(af.split("}")[1]); allIds.push(af); } } for(s in SlotSelectors) s.set("items", allList.join("\n")); inline function onSlotSelectorControl(component, value) { local index = SlotSelectors.indexOf(component); if(value != 0) { AudioLoopPlayers[index].setFile(allIds[value-1]); } }; const var numbers = [64, 48]; const var ids = [-1, -1]; for(s in SlotSelectors) s.setControlCallback(onSlotSelectorControl);