faust
faust copied to clipboard
Polyphony for the Daisy Seed
Polyphony for the Daisy Seed
Compiling faust generated cpp using faust2daisy with -nvoices > 1 fails because of dynamic_casts in poly-dsp.h
ex_faust.cpp: In member function 'void dsp_voice_group::buildUserInterface(UI*)':
ex_faust.cpp:10312:35: error: 'dynamic_cast' not permitted with '-fno-rtti'
10312 | if (!fGroupControl || dynamic_cast<SoundUIInterface*>(ui_interface)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ex_faust.cpp: In member function 'virtual void mydsp_poly::buildUserInterface(UI*)':
ex_faust.cpp:10669:17: error: 'dynamic_cast' not permitted with '-fno-rtti'
10669 | if (dynamic_cast<midi_interface*>(ui_interface)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ex_faust.cpp:10670:32: error: 'dynamic_cast' not permitted with '-fno-rtti'
10670 | fMidiHandler = dynamic_cast<midi_interface*>(ui_interface);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [/home/georg/Programmierung/daisy/libDaisy/core/Makefile:271: build/ex_faust.o] Fehler 1
Removing the -fno-rtti Option in libDaisy shouldn't be considered: https://github.com/electro-smith/libDaisy/issues/503
Steps for reproduction
Versions Used:
- Faust v2.76.0
- libDaisy v7.1.0
Daisy Toolchain Setup on Linux:
-
Create a folder, e.g.
$ mkdir ~/daisy -
Get arm-none-eabi:
- See DaisyWiki
-
Get libDaisy:
$ git clone --recurse-submodules https://github.com/electro-smith/libDaisy -
Create
environment.rcfile with the following content:export LIBDAISY_DIR=~/daisy/libDaisy GCC_PATH=~/daisy/gcc-arm-none-eabi-10-2020-q4-major/bin export PATH=$GCC_PATH:$PATH -
Compile libDaisy:
$ source environment.rc $ cd libDaisy $ make
** Compilation: **
- dsp file minimal_example.dsp
import("stdfaust.lib");
declare name "Daisy Seed Bug";
declare options "[midi:on]";
declare options "[nvoices:4]";
gate = button("gate");
vel = hslider("gain", 0, 0, 1, .01);
freq = hslider("freq", 440, 0, 20000, 0.01);
process = os.triangle(freq) * vel : _*en.adsr(.1,.1,.7,.2, gate) <: _,_;
- Generated cpp code with:
$ faust2daisy -nvoices 4 -midi -sr 48000 -bs 32 -uim -source minimal_example.dsp