-
Notifications
You must be signed in to change notification settings - Fork 139
Compiling Faust code for Bela
giuliomoro edited this page Mar 2, 2018
·
19 revisions
Since we currently only have alpha support for Faust on Bela, there is not much documentation here at the moment, however the below should get you started, whether or not you are familiar with Faust.
To interface Bela's analog and digital inputs, you need to edit the labels to follow the naming scheme:
[BELA:ANALOG_0]
or [BELA:DIGITAL_0]
:
freq = hslider("[1]Frequency[BELA:ANALOG_0]", 440 ,460, 1500, 1)
:smooth(0.999);
pressure = hslider("[2]Pressure[style:knob][BELA:ANALOG_4]", 0.96, 0.2, 2.0, 0.01)
:smooth(0.999):min(0.99):max(0.2);
gate = hslider("[0]ON/OFF (ASR Envelope)[BELA:DIGITAL_0]",0,0,1,1);
See also this dsp file as an example.
Depending on the version of the Bela image you are running, you have different options to run FAUST:
There are several ways to compile FAUST patches for Bela:
-
online playground — Go to http://faust.grame.fr/faustplayground and either find some example patches in the BIBLIO and drop them on the playground, or upload your own dsp file. Connect the audio output to preview in the browser, hit
export
, selectBela->exporter
to build and thentelecharger
to download the compiled binary. -
local compiler install faust locally and use the
faust2bela
script. - online compiler — Use the online compiler at http://faust.grame.fr/onlinecompiler. Here you can also download the Bela architecture file created by Oli Larkin and Stéphane Letz.
This is a bit more convoluted and requires installing and compiling faust
on your board and using a special Bela project. Follow the instructions here: https://github.com/giuliomoro/bela-faust-jit