Howto program a custom plugin screen


Is there kind of a programmer’s manual/hint page/starting point if you want to programm a custom plugin screen, like for example for spectre lv2, sooperlooper, internet radio or similar lv2 plugin?

I don’t think we have documented this but you could take an existing one as your starting point.

They inherit zynthian_widget_base and override various functions as required.

They are quite simple, e.g. zyntian_widget_inet_radio only implements 3 functions:

  • init
  • on_size
  • refresh_gui

They tend to depend on the engine that they represent, populating the monitors dictionary but they can hook into the engine / processor data directly. The engine is required to set self.custom_gui_fpath . If you are working on a widget screen for a LV2 plugin then you need to add it to the plugins_custom_gui of zynthian_engine_jalv.

I suggest creating one with little to no functionality then expanding to add functionality slowly. This way to see how to create it and get it to show useful stuff and have useful interaction.


Thanks @riban, yes lv2 custom widget screen, with only one extra feedback value to be visually represented, which was given back by the lv2 plugin permanently.
I’ll have a look into, probably, spectre lv2. Now that I now, that I have to register in plugins_custom_gui I try to get through the code.
If I just would derive from zynthian_widget_base, would it work like a regular lv2 widget screen then?

zynthian_widget_spectr30 is a widget for the spectr30 analysers, simply showing vertical rectangles that represent each frequency band. It is quite simple so you should be able to use it as a starting point.

[Edit] When the zynthian_gui_control (the control view) is shown, it checks to see if there is a corresponding widget and displays it if available.

I am also planning to start soon creating a dedicated screen for guitar fx/amp config - something similar to line 6 helix hx-stomp or headrush or fractal fx. I have line 6 hx-stomp so I know that we can do much better because we have a bigger screen and more control encoders and buttons. I thought to add a new option “Add guitar fx/amp chain” inside main options or “Guitar fx/amp” inside “Add special Chain” screen that will open this new screen. In background that screen will just patch multiple effects and amps in the same way that mod ui configuring using desktop app.

Thanks @riban for this intro.