I created a convolution reverb based from impulse of my lexicon pmc60
See picture.
https://imgur.com/4HfScBz
I Swap my IR with sliders with four positions.
Like David healey said I begin with this :
const var : convolution FX
const var : combobox
// Pool audio files
const audioFiles = Engine.loadAudioFilesIntoPool();
Engine.loadAudioFilesIntoPool();
// Reverb effects
const reverbs = [];
for (i = 0; i < 2; i++)
reverbs.push(Synth.getAudioSampleProcessor("Convolution Reverb" + i));
// cmbImpulse
const cmbImpulse = [];
for (i = 0; i < 2; i++)
{
cmbImpulse.push(Content.getComponent("cmbImpulse" + i));
cmbImpulse[i].setControlCallback(oncmbImpulseControl);
}
inline function oncmbImpulseControl(component, value)
{
local index = cmbImpulse.indexOf(component);
reverbs[index].setFile("{PROJECT_FOLDER}" + component.getItemText() + ".aif");
}
After
const var : knobs
const var : Filename of IR in audio folder
Callback function for each knobs
// Panel 4 : size & time parameters for plate
const var Knob2 = Content.getComponent("Knob2");
const var Knob9 = Content.getComponent("Knob9");
const var Knob10 = Content.getComponent("Knob10");
const var Knob11 = Content.getComponent("Knob11");
const var reverbmap = ["plate_size1_time1 L",
"plate_size1_time2 L", "plate_size1_time3 L", "plate_size1_time4 L","plate_size2_time1 L",
"plate_size2_time2 L", "plate_size2_time3 L", "plate_size2_time4 L","plate_size3_time1 L",
"plate_size3_time2 L", "plate_size3_time3 L", "plate_size3_time4 L","plate_size4_time1 L",
"plate_size4_time2 L", "plate_size4_time3 L", "plate_size4_time4 L"];
Knob2.setControlCallback(Knob2CB);
inline function Knob2CB(control, value)
{
if (value == 0)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(1);
cmbImpulse0.changed();
}
else if (value == 1)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(2);
cmbImpulse0.changed();
}
else if (value == 2)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(3);
cmbImpulse0.changed();
}
else if (value == 3)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(4);
cmbImpulse0.changed();
}
};
Knob9.setControlCallback(Knob9CB);
inline function Knob9CB(control, value)
{
if (value == 0)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(5);
cmbImpulse0.changed();
}
else if (value == 1)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(6);
cmbImpulse0.changed();
}
else if (value == 2)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(7);
cmbImpulse0.changed();
}
else if (value == 3)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(8);
cmbImpulse0.changed();
}
};
Knob10.setControlCallback(Knob10CB);
inline function Knob10CB(control, value)
{
if (value == 0)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(9);
cmbImpulse0.changed();
}
else if (value == 1)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(10);
cmbImpulse0.changed();
}
else if (value == 2)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(11);
cmbImpulse0.changed();
}
else if (value == 3)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(12);
cmbImpulse0.changed();
}
};
Knob11.setControlCallback(Knob11CB);
inline function Knob11CB(control, value)
{
if (value == 0)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(13);
cmbImpulse0.changed();
}
else if (value == 1)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(14);
cmbImpulse0.changed();
}
else if (value == 2)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(15);
cmbImpulse0.changed();
}
else if (value == 3)
{
cmbImpulse0.set("items", reverbmap.join("\n"));
cmbImpulse0.setValue(16);
cmbImpulse0.changed();
}
};
Mathieu