Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polyphony for the Daisy Seed #1090

Open
ghoppla opened this issue Nov 29, 2024 · 0 comments
Open

Polyphony for the Daisy Seed #1090

ghoppla opened this issue Nov 29, 2024 · 0 comments

Comments

@ghoppla
Copy link
Contributor

ghoppla commented Nov 29, 2024

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:
electro-smith/libDaisy#503

Steps for reproduction

Versions Used:

  • Faust v2.76.0
  • libDaisy v7.1.0

Daisy Toolchain Setup on Linux:

  1. Create a folder, e.g.

    $ mkdir ~/daisy
  2. Get arm-none-eabi:

  3. Get libDaisy:

    $ git clone --recurse-submodules https://github.com/electro-smith/libDaisy
  4. Create environment.rc file 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
  5. Compile libDaisy:

    $ source environment.rc
    $ cd libDaisy
    $ make

** Compilation: **

  1. 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) <: _,_;
  1. Generated cpp code with:
$ faust2daisy -nvoices 4 -midi -sr 48000 -bs 32 -uim -source minimal_example.dsp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant