convolution combobox trouble :)
-
Hi guys. I modified a little bit the @d-healey's combobox impulse loader for convolution reverb to load only specific files from the audio folder, since i have other audio files there that i don't need to show on this combobox. It compiles ok but regardless the files do not load on the processor. I thought setFile should do it... confused, can't see what i'm missing here!
Would appreciate very much some help.Engine.loadAudioFilesIntoPool(); const Space = Synth.getAudioSampleProcessor("Convolution"); const Impulse = Content.getComponent("Impulse"); const var Select = ["Hall 1.wav", "Hall 2.wav", "Hall 3.wav", "Plate 1.wav", "Plate 2.wav", "Spring.wav", "Studio A.wav", "Studio B.wav"]; inline function onImpulseControl(component, value) { if (value > 0) Space.setFile(Select[value - 1]); }; Content.getComponent("Impulse").setControlCallback(onImpulseControl); Impulse.set("items",""); for(x in Select) Impulse.addItem(x.replace("{PROJECT_FOLDER}").replace(".wav"));
-
inline function onImpulseControl(component, value) { if (value > 0) Space.setFile("{PROJECT_FOLDER}" + Select[value - 1]); }; Content.getComponent("Impulse").setControlCallback(onImpulseControl);
-
@Lindon Ah, :). Thank you so very much!
-
@musictop no problem I guess I'd be prone to get rid of all the fiddling about with Select as well and go with:
const Space = Synth.getAudioSampleProcessor("Convolution"); const Impulse = Content.getComponent("Impulse"); const var Select = ["Hall 1", "Hall 2", "Hall 3", "Plate 1", "Plate 2", "Spring", "Studio A", "Studio B"]; Impulse.set("items", Select.join("\n")); inline function onImpulseControl(component, value) { if (value > 0) Space.setFile("{PROJECT_FOLDER}" + Select[value - 1] + ".wav"); }; Content.getComponent("Impulse").setControlCallback(onImpulseControl);
-
..by the way ComboBoxes return 1 to n and never return 0 so this
if (value > 0)
isnt really required.
-
@Lindon cool, so much better. Much appreciated!