Is is possible rename the display name on combo box?
-
Is is possible rename the display name on combo box?
My stituation, it display like this: "ROJECT_FOLDER}LargeHall_IR"
I try to change this but not success :)) Thank for help!//masterIRReverb const masterIRReverb = Synth.getAudioSampleProcessor("masterIRReverb"); // Pool audio files const audioFiles = Engine.loadAudioFilesIntoPool(); // Get a list of irs const var irs = []; for (a in audioFiles) { if (a.indexOf("ir/")) //Impulse responses will be in ir folder { var ir = a.substring(a.indexOf("ir/") + 3, a.lastIndexOf(".")); irs.push(ir); } } // cmbIR const var cmbIR = Content.getComponent("cmbIR"); cmbIR.set("items", irs.join("\n")); // Populate dropdown inline function oncmbIRControl(component, value) { local filename = component.getItemText(); loadIR(filename); }; Content.getComponent("cmbIR").setControlCallback(oncmbIRControl); //Load Detail imPulse File// inline function loadIR(filename) { masterIRReverb.setFile("{PROJECT_FOLDER}LargeHall_IR.wav"); masterIRReverb.setFile("{PROJECT_FOLDER}MediumStringHall_IR.wav"); }
-
Put the paths of your IRs into an array. Use the names you want to display as the items for your combo box. In the combo box control callback you can use the value (-1) as the index to the array containing the file paths.
-
@d-healey Thank Bro