script error combo box + convolution ir list
-
hi, i am trying to make a simple combobox for a convolution reverb. I am following along with the video but I keep running into an error. Not sure how to fix this
Content.makeFrontInterface(600, 200); const var ConvolutionReverb1 = Synth.getAudioSampleProcessor("Convolution Reverb1"); const irs = Engine.loadAudioFilesIntoPool(); //cmbIr const cmbIr = Content.getcompontent("cmbIr"); inline function oncmbIrControl(component, value) { //Add your custom logic here... }; Content.getComponent("cmbIr").setControlCallback(oncmbIrControl); cmbIr.set("items","") for (x in irs) cmbIr.addItem(x.replace("{PROJECT_FOLDER}").replace(".wav"));
This is the error its showing for this line for (x in irs)
Interface:! Line 19, column 1: Found 'for' when expecting ';' {{SW50ZXJmYWNlfG9uSW5pdCgpfDQwNHwxOXwx}} Master Chain:! Line 19, column 1: Found 'for' when expecting ';' {{SW50ZXJmYWNlfG9uSW5pdCgpfDQwNHwxOXwx}}
-
@xxx That error message is telling you that you missed a semicolon
;
at the end of the previous line. -
This post is deleted! -
@d-healey Gotcha thanks
-
@d-healey hi, so i got the combo box working for my convolution reverb. i tried swapping it for a knob using the same logic—just changed the component. it compiles, but moving the knob throws errors and does nothing. not sure what i’m missing. couldn't find anything about this on the forum
-
@xxx Combo boxes start at 1, what does your knob start at? I'm guessing 0 because you are subtracting 1 from the value on line 14 and that's giving you an undefined error - my guess is that it's trying to access the array with index
-1
which is invalid.