Zynthian Emulator Setup for Development

From ZynthianWiki
Jump to navigation Jump to search

The developing+testing cycle for the Zynthian UI can be slow if you have to test everytime in a real Zynthian Box. Using your Zynthian Box as your development environment is not optimal, neither copying & testing in the Zynthian Box all the time. You can access the files remotely, or use a CLI editor like vi, but the SD card is not a reliable media when you make changes all the time and you have the risk or corrupting the filesystem and losing data.

For addressing these problems, i have created a Zynthian Emulation Environment that allows to run the Zynthian UI in a Linux Desktop/Laptop. It emulates the RBPi GPIO (wiringPiEmu wrapper) and the rotary encoders (using POSIX signals), so you run the Zynthian UI code without modifications using a special Wiring Layout.

So you only need to create the right directory structure and compile/install the needed packages for running Zynthin UI. This includes libraries, tools, synth engines, plugins, etc.

1 Installation / Setup:

There are 2 different setup scripts for 2 flavours of Linux distributions:

These scripts can help you to setup your system, but certainly the scripts are out-dated and you may need to tweak a little bit. I recommend to run line by line from the terminal, trying to understand what you do. You can use the RBPi setup script as a reference, as it will be up-to-date.

2 Execution:

Open 3 terminals. Of course, you can use less, but i prefer to use separate terminals:

Terminal 1: Jack Start & Midi Connections

qjackctl &

You would need to configure your jackd system if it's not already done. You could test that it's working using some of the synth engines you already have installed.

Terminal 2: Alsa => Jack MIDI bridge

a2jmidid -e

Perhaps you want to add the "a2jmidid -e" command to your qjackctl setup and avoid this terminal ;-)

Terminal 3: Emulator

cd zynthian
cd zynthian-emuface
./zynthian_emuface.py

If you set the environment variable "ZYNTHIANX" like this:

export ZYNTHIANX=$DISPLAY

Zynthian UI will open the native engine GUI when available.


2.1 References