Our FAUST bindings are currently lacking a way to set or send output parameters, such as the CV outputs on Wizard and Magus.
There is however a 'foreign function' which allows you to control the OWL Modular trigger output. It looks like this:
push = ffunction(int owl_pushbutton(int), <owl.h>,"");
and you can then send an int to
push to toggle the output.
We could generalise this to send arbitrary button and parameter changes. Maybe something like this:
owl_push = ffunction(int owl_pushbutton(int), <owl.h>,"");
owl_button = ffunction(int owl_button(int, int), <owl.h>,"");
owl_parameter = ffunction(int owl_parameter(int, float), <owl.h>,"");
and define some constants to identify the assignments:
OWL_A = fconstant(int PARAMETER_A, <owl.h>);
OWL_B1 = fconstant(int BUTTON_A, <owl.h>);
All this could be rolled into an
owl.lib include file, so at the start of your FAUST patch you just need to
and then if, for some reason, you wanted to route Button 1 input to Button 6 output you could just do this:
process = button("Button1[OWL:B1]") : owl_button(OWL_B6);
or with parameters:
process = hslider("[OWL:A]",0,0,1,0.01) : owl_parameter(OWL_G);
Of course the FAUST bindings, or architecture, also needs updating to support this. Oh and I'm planning to change the button names! No more ButtonA or ButtonB, they'll be B1, B2 et c. Okay?
The examples above actually work, I've done the changes locally and tested it.
However I'm pretty useless with FAUST, so I can't say if this is a great idea or a rubbish one.
In particular I'm not sure how to manage this in a FAUST graph, where these foreign functions are really identity functions with side effects. Do I have to add dummy signal paths to send data into the functions? Where do they end up going?