From 46cb87211b39b2f99b9370c1d060b0f34d8872f2 Mon Sep 17 00:00:00 2001 From: Pierre Date: Fri, 17 Feb 2023 10:41:08 +0100 Subject: [PATCH] [control] added MIDI->UART control --- doc/dependencies.md | 12 ++++++++++++ scripts/sylib.tcl | 1 + source/faust/control/gui-controls.cpp | 14 +++++++++++--- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/doc/dependencies.md b/doc/dependencies.md index 95c4616..f68ff11 100644 --- a/doc/dependencies.md +++ b/doc/dependencies.md @@ -107,3 +107,15 @@ On **Archlinux**, if you see an error like this one ``` you'll have to rename the `Vivado/2020.2/tps/lnx64/binutils-2.26` (Vitis will then search in the system libraries). + +#### Vitis/JAVA problems + +On recent systems (or **archlinux**), you might have problems compiling the host-side (**ARM**) application. The problem is caused by system libraries requiring newer versions of GCC than the one provided by Vitis. Replacing GCC target in Vitis' path **by system GCC** works : + +```bash +$ cd $XILINX_ROOT_DIR/Vitis/2020.2/lib/lnx64.o/Default +$ mv libstdc++.so.6 libstdc++.so.6.old +$ rm -rf libstdc++.so (symlink) +$ sudo ln -s /usr/lib/libstdc++.so.6 libstdc++.so.6 +``` + diff --git a/scripts/sylib.tcl b/scripts/sylib.tcl index f83009f..f762820 100644 --- a/scripts/sylib.tcl +++ b/scripts/sylib.tcl @@ -443,6 +443,7 @@ proc generate_gui_app { dsp } { # I guess that's one of the limits of tcl... set pkgc [exec pkg-config --libs --cflags gtk+-2.0] lappend pkgc -I$::Syfala::INCLUDE_DIR + lappend pkgc "-lasound" set cmd "c++ -v -std=c++14 $::Syfala::GUI_DST_FILE $pkgc -o $::Syfala::BUILD_GUI_DIR/faust-gui" print_info "Executing command: $cmd" exec {*}$cmd >&@stdout | tee -a $Syfala::BUILD_LOG diff --git a/source/faust/control/gui-controls.cpp b/source/faust/control/gui-controls.cpp index a4ccaa2..0717cdc 100644 --- a/source/faust/control/gui-controls.cpp +++ b/source/faust/control/gui-controls.cpp @@ -3,6 +3,9 @@ #include #include #include +#include +#include +#include /****************************************************************************** ******************************************************************************* @@ -38,9 +41,14 @@ int main(int argc, char* argv[]) // UART interface UARTSenderUI uart_ui; DSP.buildUserInterface(&uart_ui); - // Start sending + + // MIDI interface + rt_midi rt("MIDI"); + MidiUI midi_ui(&rt); + DSP.buildUserInterface(&midi_ui); + + // start sending & run uart_ui.start(); - - // Run + midi_ui.run(); gtk_ui.run(); }