openGL UIs for LV2 plugins

View page as slide show

Robin Gareus


linuxaudio.org, CiTu.fr


Linux Audio Conference 2013, Graz

Definitions

LV2 (LADSPA version 2) is an open standard for plugins (and hosts), targeted at audio processing.

openGL is a cross-language, multi-platform API for rendering 2D and 3D computer graphics.

Why LV2 GUIs

  • No custom UI is the preferred method
    • Host generated UI (common look&feel, UI guidelines,..)

Why LV2 GUIs

  • No custom UI is the preferred method
    • Host generated UI (common look&feel, UI guidelines,..)

but..

Why LV2 GUIs

  • No custom UI is the preferred method
    • Host generated UI (common look&feel, UI guidelines,..)

but

  • Specialized plugins
    • Important visual feedback
    • Huge number of controls
    • Dependencies between controls
    • Custom widgets e.g. 3D panning

Why LV2 GUIs

  • No custom UI is the preferred method
    • Host generated UI (common look&feel, UI guidelines,..)

but

  • Specialized plugins
    • Important visual feedback
    • Huge number of controls
    • Dependencies between controls
    • Custom widgets e.g. 3D panning
  • Corporate look&feel (VST anyone?!)

LV2 GUIs

  • openGL

LV2 GUIs

  • 3D FPS..

LV2 GUIs

  • 3D FPS..
  • Audio Effects!

LV2 GUIs

  • 3D FPS..
  • Audio Effects!
  • WTF?!? :)

The toolkit + ABI issue 1

  • Simple setup - plugin inside host

The toolkit + ABI issue 2

  • Simple setup - plugin inside host

The toolkit + ABI issue 3

  • Simple setup - plugin inside host

The toolkit + ABI issue 4

  • Plugin and host use the same toolkit.
  • Toolkit is a shared lib
  • Identical version of library

The toolkit + ABI issue 5

  • Plugin and host use the same toolkit.
  • ..but plugin & host were built with different versions
  • ABI (Application Binary Interface) does not match
  • → conflicts of symbols
  • → segfault..

The toolkit + ABI issue

Possible solutions to the API + ABI conflict:

  • Compile plugin and host with same version of the library

The toolkit + ABI issue

Possible solutions to the API + ABI conflict:

  • Compile plugin and host with same version of the library
  • Run plugin as separate process

The toolkit + ABI issue

Possible solutions to the API + ABI conflict:

  • Compile plugin and host with same version of the library
  • Run plugin as separate process
  • Use only libraries which are API and ABI compatible across versions

GUI Toolkits

  • gdk/gtk (non relocatable, problematic on win, hard on OSX)
  • Qt (huge framework, many edge-cases)
  • libx11/xcb (no windows, not on OSX by default)
  • libclxclient (no windows, not on OSX by default)
  • FLTK (different back-ends depending on OS,..)
  • openGL

GUI Toolkits

  • gdk/gtk (non relocatable, problematic on win, hard on OSX)
  • Qt (huge framework, many edge-cases)
  • libx11/xcb (no windows, not on OSX by default)
  • libclxclient (no windows, not on OSX by default)
  • FLTK (different back-ends depending on OS,..)
  • openGL

GUI Toolkits

  • gdk/gtk (non relocatable, problematic on win, hard on OSX)
  • Qt (huge framework, many edge-cases)
  • libx11/xcb (no windows, not on OSX by default)
  • libclxclient (no windows, not on OSX by default)
  • FLTK (different back-ends depending on OS,..)
  • openGL

GUI Toolkits

  • gdk/gtk (non relocatable, problematic on win, hard on OSX)
  • Qt (huge framework, many edge-cases)
  • libx11/xcb (no windows, not on OSX by default)
  • libclxclient (no windows, not on OSX by default)
  • FLTK (different back-ends depending on OS,..)
  • openGL

GUI Toolkits

  • gdk/gtk (non relocatable, problematic on win, hard on OSX)
  • Qt (huge framework, many edge-cases)
  • libx11/xcb (no windows, not on OSX by default)
  • libclxclient (no windows, not on OSX by default)
  • FLTK (different back-ends depending on OS,..)
  • openGL

GUI Toolkits

  • gdk/gtk (non relocatable, problematic on win, hard on OSX)
  • Qt (huge framework, many edge-cases)
  • libx11/xcb (no windows, not on OSX by default)
  • libclxclient (no windows, not on OSX by default)
  • FLTK (different back-ends depending on OS,..)
  • openGL

GUI Toolkits

  • gdk/gtk (non relocatable, problematic on win, hard on OSX)
  • Qt (huge framework, many edge-cases)
  • libx11/xcb (no windows, not on OSX by default)
  • libclxclient (no windows, not on OSX by default)
  • FLTK (different back-ends depending on OS,..)
  • openGL

There are no dedicated audio related widgets in either toolkit by default (with exception of libclxclient and some qt stuff*).

Pro/Cons of openGL

Problems:

  • No widgets at all.

Pro/Cons of openGL

Problems:

  • No widgets at all.
  • No default fonts.

Pro/Cons of openGL

Problems:

  • No widgets at all.
  • No default fonts.
  • No Desktop integration.

Pro/Cons of openGL

Advantages:

  • Cross-platform

Pro/Cons of openGL

Advantages:

  • Cross-platform
  • Minimal (no) library dependencies, API & ABI backwards compatible to ~1999.

Pro/Cons of openGL

Advantages:

  • Cross-platform
  • Minimal (no) library dependencies, API & ABI backwards compatible to ~1999.
  • Hardware accelerated.

Pro/Cons of openGL

Advantages:

  • Cross-platform
  • Minimal (no) library dependencies, API & ABI backwards compatible to ~1999.
  • Hardware accelerated.
  • 3D (!)

Pro/Cons of openGL

Advantages:

  • Cross-platform
  • Minimal (no) library dependencies, API & ABI backwards compatible to ~1999.
  • Hardware accelerated.
  • 3D (!)
  • UIs can be designed in e.g. blender.

State of the Art

  • August 2012: first LV2 + GL example plugin
  • March 2013: two real LV2 openGL plugins:
    • setBfree – b_synth.lv2
    • balance.lv2
  • Spring 2013: widget model from blender & implementation in C
    • Dial aka rotary knob
    • Switch / Toggle Button
    • Radio Button / Push Button
    • Level Meter
    • Organ Drawbars
  • May 2013: started to break out openGL lv2 lib.
  • Last night: updates to libsuil to directly support openGL cross platform.

Examples

Some screenshots first..


..audio examples right after.

setBfree Blender Model

setBfree main UI

setBfree main UI - rotated

setBfree Program List

setBfree - Text Entry

setBfree - File Chooser

balance.lv2

balance.lv2 - side-view

Q&A

Thanks for your attention.


Questions?!


(while I prepare/launch the demo)

 
wiki/glv2.txt · Last modified: 10.05.2013 08:47 by rgareus