The Zynthian Emulator

IMPORTANT: Comments are closed in this post, please, use the forum.

Developing software for Zynthian is slighty more complex than developing software for a desktop platform. You need a Zynthian Box (ZBox) over your desk running all the time and connected to the network. You must login by ssh everytime you reboot the ZBox. Every time you want to test your changes, you have to copy the modified files into the ZBox, compile if needed, and run the program from the shell.


This cycle makes development slower than normal, and although you use scripts and tools to agilize the process, finally you realize that there is a better way 😉

On the other hand, it would be nice if people could try Zynthian easily. Until now, you needed a ZBox to run the Zynthian User Interface (ZUI), and to be honest, currently it’s a little difficult to obtain a ZBox. You have to build it by yourself, spending some time and euros.

The problem is that the ZUI depends on 4 rotary encoders and 4 switches. These elements are physical in the real ZBox, but can be easily emulated by software, so …

I’ve developed a Zynthian Emulator. A standard desktop application (mouse driven GUI) that emulates the 4 rotary encoders and the 4 switches by using standard widgets. The emulator call the ZUI, that is embbeded inside, simulating the look & feel of a real ZBox.

The ZUI doesn’t perceive the difference, and you can play with it in the same way that you play with the real thing. You can test your changes faster and easier, and the development process is improved a lot.

Furthermore, people that want to explore the ZUI, or have a first Zynthian Experience before building its own ZBox, now can do it. Enjoy!!

How does it work?

Well, the secret of the emulation is the new emulation layer added recently to the Zyncoder library. This emulation layer implements the wiringPi API over a virtual GPIO with 15 pins. These virtual pins are simulated using POSIX signals. It uses the 30 signals from SIGRTMIN to SIGRTMAX. Two signals by every pin (ON/OFF).

In that way, when Zynthian UI can’t detect a real GPIO, it uses the emulation layer, awaiting for RT signals that simulate the virtual pins of the virtual GPIO.

Then, you can send this signals from a external program, when a button widget is clicked, or when a rotary control widget is turned.

I know that this method has limitations (only 15 pins) and that the emulation could be better achieved using a more powerful IPC method, some kind of messaging protocol, like OSC. I’ve used this method (signals) by simplicity but i hope to improve it in a near future. By the moment, is enough … and it works like a charm!! 😉


Inline Feedbacks
View all comments
John McGee
John McGee
8 years ago

what are system requirements to your emulator?
and how do you install it?
as I have lots of other question and will be building one of your boxes soon. so to try it out and see if i can make it work in my current touring rig.

John McGee
John McGee
8 years ago
Reply to  jofemodo

Thanks or the info will work on setting this up on my mac in the studio next week. I play midi guitar and have also built a 2 octave set of polyphonic foot pedals. I do not like using a laptop when i tour which means racks of synths and samplers. so hope it can simplify my rig. there are some mods to your unit as I would need balance outs, also how much heat is produced form the unit in a live stage situation should a fan go in the case? The big test is to see if one… Read more »

7 years ago

Hola, estará disponible para windows ?
Seria interesante.
Un saludo.

7 years ago
Reply to  jofemodo

Ok. Thx

7 years ago

Just what I’m been looking for! Can Zynthian be able to function as a Drum Sampler/Synth. My idea is to use Drumkv1 however, I need more than a stereo output. This could be adapted to use a USB2.0 audio interface over the HiFiBerry? I have a ESI MEGAPORT HD+ 8 channel adaptor.
Also I’d like to include a 16 channel drum trigger board which connects directly to the Raspberry Pi hardware to reduce the latency if using a trigger to midi interface. Have a menu to adjust trigger sensitivity, X-talk and threshold. Does this sounds feasible?