Note that to facilitate compilation and deployement, the interpreter backend is used instead of the LLVM IR backend (faster produced DSP code).
make && make installto build it
Faust DSP files have to be loaded in VCV Prototype and edited in a external editor (Visual Studio Code, Atom...). Each time the file is saved, it will be recompiled and executed. To possibly save compilation time, the DSP machine code is saved in a cache, and possibly restored the next time the session will be loaded.
The 6 switches, knobs as well as the lights and switchLights can be connected to UI controllers using metadata:
[switch:N](with N from 1 to 6) has to be used in a
checkboxitem to connect it to the prototype interface switch number N. Pushed buttons will become red when on, and checkboxes will become white when on.
[knob:N](with N from 1 to 6) has to be used in a
nentryitem to connect it to the prototype interface knob number N. The knob [0..1] range will be mapped to the slider/nentry [min..max] range.
[light_red|green|red:N](with N from 1 to 6) has to be used in a
hbargraphitem to connect it to the prototype interface light number N.
[switchlight_red|green|red:N](with N from 1 to 6) has to be used in a
hbargraphto connect it to the prototype interface switchLight number N.
[scale:lin|log|exp]metadata is implemented.
The faust_libraries/rack.lib Faust library contains useful functions to convert VC signals, and can be enriched if needed.
Here is a simple example showing how oscillators can be controlled by UI items:
import("stdfaust.lib"); // UI controllers connected using metadata freq = hslider("freq [knob:1]", 200, 50, 5000, 0.01); gain = hslider("gain [knob:2]", 0.5, 0, 1, 0.01); gate = button("gate [switch:1]"); // DSP processor process = os.osc(freq) * gain, os.sawtooth(freq) * gain * gate;
Some additional files can be seen in the examples folder: