I noticed the Emulator is no longer being developed and pyqt4 is also no longer supported and seemingly not easy to install on a newer system. I did some initial testing porting it to pyqt5 but I didn’t get the ZynthianUI running.
Instead of focusing on the emulator I found multiple issues keeping Zynthian-UI from starting on my desktop OS which is currently Fedora 38. This thread is more to document the issues and how I am fixing them (probably going to make a PR when I’m done)
Code snippets that are currently in the post will be moved to a Github fork soon
1. Shellscript
Based on then zythian_gui_emu.sh
in the zynthian-emuface repo I created the following script:
#!/bin/bash
source ../zynthian-sys/scripts/zynthian_envars.sh
export DISPLAY_WIDTH="480"
export DISPLAY_HEIGHT="320"
export ZYNTHIAN_TOUCHOSC=1
export ZYNTHIAN_WIRING_LAYOUT="EMULATOR"
export RBPI_VERSION=""
cd ../zynthian-ui
exec ./zynthian_main.py
The RBPI_VERSION
is necessary due to an “in” check in zynthian-ui/zyngine/zynthian_engine_jalv.py: line 80
which crashes unless this variable is set.
2. LV2 Plugins not found causes crash
zynthian-ui/zyngine/zynthian_lv2.py: line74
tries to get the last file modification time of the Jalv lv2 config, which doesn’t exist. This causes a crash.
My current workaround is to just set mtime
to 0
instead of using os.stat
. This is only a workaround and not a fix. Ideally this would be changed later to happen when the file is not found.
3. Zynthian Gui config crashes if Zyncoder is missing
Mainly because certain variables are undefined if that happens. I just added default declarations in zyngui/zynthian_gui_config.py: 694
:
num_zynpots = 0
num_zynswitches = 0
last_zynswitch_index = 0
4.1 Zynmixer can’t be compiled
This is mainly caused by the distro I’m using (Fedora 38) shipping Pipewire-Jack instead of Jackd.
Pipewire still provides Jack development libraries but the CMake file doesn’t know how to find them.
Fix: Use PkgConfig to find the proper Jack library options:
Modified zynthian-ui/zynlibs/zynmixer/CMakeLists
:
cmake_minimum_required(VERSION 3.5)
project(zynmixer)
include(CheckIncludeFiles)
include(CheckLibraryExists)
find_package(PkgConfig REQUIRED)
pkg_check_modules(JACK REQUIRED IMPORTED_TARGET jack)
add_library(zynmixer SHARED mixer.h mixer.c tinyosc.h tinyosc.c)
target_link_libraries(zynmixer PkgConfig::JACK)
install(TARGETS zynmixer LIBRARY DESTINATION lib)
There are still some issues like the Python wrapper expecting zynmixer to be at a absolute path which can’t be changed.