Selecting different functions in Faust
-
Sorry for the basic Faust question.
How can I make a selection of the functions below, along with a few more functions, using a single slider?
re.jcrev; re.zita_rev1_stereo(20, 200, 2000, 3.0, 2.0, 48000); re.dattorro_rev(200, 0.5, 0.7, 0.6, 0.5, 0.7, 0.5, 0.2); -
@JulesV AFAIK branching isn't really supported in Faust, so the most practicable solution would be to use a branch container in scriptnode and use one faust node per effect you want to switch.
-
@Christoph-Hart Thank you for the info
-
@JulesV You can possibly use ba.selectmulti as in:
process = ba.selectmulti(100, (fx1, fx2, fx3), nentry("Model", 0, 0, 2, 1)) with { fx1 = re.jcrev; fx2 = re.zita_rev1_stereo(20, 200, 2000, 3.0, 2.0, 48000); fx3 = re.dattorro_rev(200, 0.5, 0.7, 0.6, 0.5, 0.7, 0.5, 0.2); };But yes the 3 branches will always run here.