Just started making this Java Swing interface to control lots of parameters in a separate window from my sketch. Is there a way in Java to make references closer to this old jQuery code I made a
while ago with ToneJS:
the dataset comes from my custom html attributes.
`
effects = {"delay": delay, "trem": trem, "soundFilter": soundFilter};
$("input[type='range']").on("input", function() {
effects[this.dataset.module][this.id][this.dataset.suffix] = this.value;
}
});
`
Module = effects key(ref to object to modify), id = param(time, rate, etc), suffix is ‘value’ or ‘’ if no value suffix needed.
This handled lots of sliders and worked as I expected without the need of if statements or a switch statement.
Is it possible to do something similar in Java instead of object(dot)property?