Zynthian MOD-GUI Guide

From ZynthianWiki
(Redirected from Zynthian modgui Guide)
Jump to navigation Jump to search

1 How to create modgui images for MOD-UI

1.1 What is MOD-UI?

MOD-UI is an open-source web GUI for LV2 plugins.

It is written and maintained by http://www.moddevices.com. They sell a very nice effect pedal device called Mod Duo for about €549.00. Mod Duo is configurable via a built-in webpage accessible by a USB or Ethernet connection to the device.

MOD-UI is the code for the webpage. It's open-source, too, so Zynthian uses it as one of the synth engines. In MOD-UI you can drag & drop icons representing LV2-plugins of several types (modulators, equalizer, generators (=> synths), distortions, voice effects, vocoders, ...) and connect them together in a way which is really intuitive and easy.

1.2 What is a modgui?

As I said: MOD-UI is based on LV2 plugins. For interacting with the LV2-plugin the default icon in MOD-UI is a tin (looks like a tin for fish). But plugins also have different parameters and they should look not the same. Here is the point where modgui is used. In fact modgui is an addition to the description of the plugin plus some graphic data and stylesheets. The description is written down in text files in the Turtle-Syntax.

1.3 What is MOD-SDK?

Writing Turtle files is (IMHO) not really easy. Also reusing and creating nice looking images for different plugins with different parameters is not easy to write down in Turtle. So MOD has created a (MOD-)SDK. This is an additional server (like the MOD-UI server) which has several templates for creating nice looking modguis for plugins. MOD-SDK should already be installed on Zynthian but it is not enabled. Also if it is not installed: it is not difficult to get it installed and running.

1.4 How to create a modgui?

First check if MOD-SDK is installed. Currently you need to login via ssh to your Zynthian. Than try systemctl start mod-sdk. If it starts, you should be able to go to http://<YOUR-ZYNTHIAN-IP>:9000. If not: here is a recipe for installing mod-sdk on your Zynthian:

 cd /zynthian
 git clone https://github.com/dcoredump/zynthian-recipe
 cd zynthian-recipe/recipe
 sh mod-sdk.sh

1.4.1 The easy way

Ok. This is really easy: Go to http://<YOUR-ZYNTHIAN-IP>:9000. You see a selection-box with Select-Bundle. Choose the LV2-plugin (bundle) which you want to edit. You get a page with an index for sub-pages and some information about the selected plugin. Now you can walk through the sub-pages.

The most important page is the 2nd: Icon. When you select it you get a button named Launch Wizard. After pressing you get a sub-window where you can choose the box-style, box color, knob-style and panel-layout. I think trying around is the best way to learn what is useful and what not. You should have in mind that plugins have different parameters and mapping all or nothing to knobs and/or select boxes may not be the best way. So I think the best way is to go to the next step (button Next). It shows all the parameters and how they will be mapped to the current nulber of knobs/select-boxes. Think about which parameters will be useful to have directly on top of the plugin and which not and map them (e.g. I would try to map Volume to the first button if it is available). Perhaps you have to switch Back and Next several times until you get what you want. On the last step you can create the screenshots. Do this. Now press Finish and you get back to the main pages.

If you switch to the next sub-page (Icon screenshot) you can generate the screenshots, too.

On the sub-page Settings you can advise the initial parameters for this plugin.

And now: Deploy - a very nice feature. If there is not the right IP-address (including the port!) of your Zynthian in the text field: edit/change this field! After deploying you cannot see the new icons right now. You first have to reload MOD-UI/mod-host: go to the shell and enter systemctl restart mod-host && systemctl restart mod-ui. After reloading the web-page of MOD-UI you should see the generated icons. Try to move it to the pedalboard and try the knobs if they are working.

That's it! Congratulations!

Ahhh - one thing: Store the generated modgui on another computer - or better: distribute it! How to do that? First you have to copy the files from your Zynthian to your main computer. I am doing this by:

 scp -r root@<YOUT-ZYNTHIAN-IP>/zynthian/zynthian-plugins/lv2/<LV2-PLUGIN-NAME>.modgui .

Please ZIP or TAR this folder and send it to support@zynthian.org.

1.4.2 The nicer way

(This is not fully tested and documented - will do this soon (hopefully))

You can pimp the generated images: Go inside the folder of the generated modgui and edit the images with GIMP or something else. This has the disadvantage that the screenshots are not showing the changed images anymore. No problem: You can generate screenshots by hand directly on your Zynthian:

 /zynthian/zynthian-sw/mod-sdk/make_screenshot.py /zynthian/zynthian-plugins/lv2/<YOUR-PLUGIN-FOLDER>


1.4.3 The hard but very nice looking way

You can also create your own images and stylesheets by hand. Take a look on some generated modguis of other plugins and try... sorry - I have no information about this - but perhaps you want to write the article how to do this?