Show name of Convolution Reverb IR in a label?
-
@d-healey Thanks David. Still struggling to get it working and getting error messages saying function not found for the 'getCurrentlyLoadedFile' line.
I've tried 2 ways, as I wasn't sure if it was meant to start with 'Engine' or 'Reverb1'
I'll put the 2 lots of code below. Can you spot the mistake at all? Confused!
(I already have a reference to Reverb1 further up in the code)
// Reverb1 IR Name in Label const var Label1 = Content.getComponent("Label1"); inline function onKnob4Control(component, value) { if (Reverb1.getCurrentlyLoadedFile() == "") Content.getComponent("Label1").set("text", "Right Click To Load IR"); else Content.getComponent("Label1").set("text", Reverb1.getCurrentlyLoadedFile()); }; Content.getComponent("Knob4").setControlCallback(onKnob4Control);
// Reverb1 IR Name in Label const var Label1 = Content.getComponent("Label1"); inline function onKnob4Control(component, value) { if (Engine.getCurrentlyLoadedFile() == "") Content.getComponent("Label1").set("text", "Right Click To Load IR"); else Content.getComponent("Label1").set("text", Engine.getCurrentlyLoadedFile()); }; Content.getComponent("Knob4").setControlCallback(onKnob4Control);
-
Did you get the reverb as an audio processor or an effect?
-
It's referenced as an effect at the moment like this:
const var Reverb1 = Synth.getEffect("Reverb1");
-
I just tried adding this:
const var Reverb1 = Synth.getAudioSampleProcessor("Reverb1");
...but now I get a duplicate const var declaration
-
@SteveRiggs do you have two variables with the same name?
-
It's probably because there is:
const var Reverb1 = Synth.getAudioSampleProcessor("Reverb1");
and
const var Reverb1 = Synth.getEffect("Reverb1");
but not sure which one I need now so it will work for both things. The other reference to it is for a button that bypasses and enables Reverb 1
-
@SteveRiggs Why not have both but with different names?
-
Good point! I just changed one to
const var Verb1 = Synth.getAudioSampleProcessor("Reverb1");
and left the other as
const var Reverb1 = Synth.getEffect("Reverb1");
but I'm still getting 'function not found' in the console
-
@SteveRiggs I'll look at it in the morning when I'm at my PC
-
@d-healey Ok thanks. Could be a bug. Seems weird its not working. I'll leave it for now until tomorrow then and come back to it. Cheers for your help
-
Ok it turns out the
getCurrentlyLoadedFile
function is part of the AudioFile class, not the AudioSampleProcessor class.How are users selecting the IR they want to use in your plugin?
-
@d-healey Got ya. Thats why it doesn't work then. Cheers for checking.
At the moment the IR's are being loaded just by right clicking on the audio waveform on the GUI and choosing from the AudioFiles folder
-
Does that provide any kind of callback function?
-
@d-healey Not that I know of. I just have the AudioWaveform linked to Reverb1 in the property editor/processorId