Code to load ir files is not working
-
I followed this video to the letter
https://www.youtube.com/watch?v=qR1jYrqQXrY
The first problem I get is that the line:
with this line of codeconst irs = engine.loadAudioFilesIntoPool()
I get this error: Line 5, column 42: Unknown function 'loadAudioFilesIntoPool'
So I replaced it with this
const irs = FileSystem.findFiles("AudioFiles", "*.wav", false);
Which compiles ok, but the combobox does not populate.
Here's all of the code.Content.makeFrontInterface(700, 600); const var ConvolutionReverb1 = Synth.getAudioSampleProcessor("Convolution Reverb1"); const irs = FileSystem.findFiles("AudioFiles", "*.wav", false); //cmbir const var cmbir = Content.getComponent("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"));
-
@pcs800 said in Code to load ir files is not working:
s = engine.loadAudioFilesIntoPool()
it's Engine with a capital E
-
@ulrik
Thank you, I cannot believe I missed that.
But now when I compile, I get this
Line 21, column 14: function not found
Which is referencingcmbir.additem(x.replace("{PROJECT_FOLDER}").replace(".wav"));
-
cmbir.additem(x.replace("{PROJECT_FOLDER}").replace(".wav")); // typo cmbir.addItem(x.replace("{PROJECT_FOLDER}").replace(".wav")); // replace with
-
@pcs800 said in Code to load ir files is not working:
followed this video to the letter
crucial
Functions are written in camel-case. Good to always double check that if you get an error. -
@Chazrox Wow, upper/lower case is killing me here. Thank you for taking the time to reply.
-
@pcs800 All good. No worries!