Difference between revisions of "Zynthian Emulator Setup for Development"
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | 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. | ||
== Installation / Setup: == | == Installation / Setup: == | ||
− | There are | + | |
+ | There are 2 different setup scripts for 2 flavours of Linux distributions: | ||
+ | |||
* [https://github.com/zynthian/zynthian-sys/blob/master/scripts/setup_system_desktop_jessie.sh Debian Jessie] | * [https://github.com/zynthian/zynthian-sys/blob/master/scripts/setup_system_desktop_jessie.sh Debian Jessie] | ||
* [https://github.com/zynthian/zynthian-sys/blob/master/scripts/setup_system_desktop_fc23.sh Fedora 23] | * [https://github.com/zynthian/zynthian-sys/blob/master/scripts/setup_system_desktop_fc23.sh Fedora 23] | ||
− | + | ||
+ | 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. | ||
== Execution: == | == Execution: == | ||
− | Open | + | Open 3 terminals. Of course, you can use less, but i prefer to use separate terminals: |
'''Terminal 1: Jack Start & Midi Connections''' | '''Terminal 1: Jack Start & Midi Connections''' | ||
<source lang="bash"> | <source lang="bash"> | ||
− | + | qjackctl & | |
</source> | </source> | ||
+ | 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''' | '''Terminal 2: Alsa => Jack MIDI bridge''' | ||
Line 19: | Line 28: | ||
a2jmidid -e | a2jmidid -e | ||
</source> | </source> | ||
− | Perhaps you want to add the "a2jmidid -e" command to your qjackctl setup ;-) | + | Perhaps you want to add the "a2jmidid -e" command to your qjackctl setup and avoid this terminal ;-) |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | '''Terminal | + | '''Terminal 3: Emulator''' |
<source lang="bash"> | <source lang="bash"> | ||
cd zynthian | cd zynthian | ||
Line 43: | Line 45: | ||
Zynthian UI will open the native engine GUI when available. | Zynthian UI will open the native engine GUI when available. | ||
− | |||
− | == | + | === References === |
− | |||
− | [ | + | * [[Zynthian_Emulator|Zynthian Emulator]] |
+ | * [http://blog.zynthian.org/index.php/2016/02/27/zynthian-emulator Blog entry about the Zynthian Emulator] | ||
+ | * [https://discourse.zynthian.org/search?q=Zynthian%20Emulator Forum Posts about Zynthian Emulator] |
Latest revision as of 19:49, 18 February 2018
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.