@d-healey i tried to reference the filter with this:
const var filter = Synth.addEffect("PolyphonicFilter", "MAIN FILTER", -1);
but i get API call with undefined parameter 1
What should i use for the last parameter in the Synth.addEffect line?
here's my code again,
const var filter = Synth.addEffect("PolyphonicFilter", "MAIN FILTER", -1)
const var comboBox = Content.getComponent("FilterType");
const var modes = Engine.getFilterModeList();
const var myFilters = [modes.LowPass, modes.HighPass, modes.BandPass];
comboBox.addItem("LowPass");
comboBox.addItem("HighPass");
comboBox.addItem("BandPass");
inline function onComboBoxControl(component, value)
{
local filterIndex = value - 1;
filter.setAttribute(filter.Mode, myFilters[filterIndex]);
}
comboBox.setControlCallback(onComboBoxControl);