Re: [LAD] How to develop guis for LV2?

From: Nedko Arnaudov <nedko@email-addr-hidden>
Date: Sun Nov 08 2009 - 14:00:17 EET

Here is what should be (IMO) with current extension list (as i know it):

"Gabriel M. Beddingfield" <gabriel@email-addr-hidden> writes:

> FOR SYNTH HOSTS:
> ----------------
>
> If you follow these guidelines, you may call yourself an "LV2 Synth Host"
> and you will be able to work cleanly with every synth that calls itself an
> "LV2 Synth Plugin."
>
> + Support (at least) extensions A, B, and C.

 * the MIDI event extension
 * the Event port extension
 * the URI map extension
 * the external UI extension

GTK hosts must support the GTK UI extension

> + The synths will have several MIDI input ports (for note data)
> and several audio output ports.
> + All configuration will be done with the events extension.
> + All feedback will be done with the events extension.

currently, parameter ports and monitor control (float) ports are
supposed to be used for this. event ports could be used for parameter
and monitor events but i'm not aware of someone using them for this
purpose.

> + The plugins may provide a GUI interface. Its width will be
> 200, 400, 600, or 800 pixels. Its height will be a multiple
> of 100 pixels.

I don't get why such restriction is needed.

> FOR SYNTH PLUGINS:
> ------------------
>
> If you follow these guidelines, you may call yourself an "LV2 Synth
> Plugin" and you will be able to work cleanly with every host that calls
> itself an "LV2 Synth Host."
>
> + Freely use extensions A, B, and C. If you use any extra
> LV2 extensions, try to make them optional. Otherwise,
> please simply call yourself an "LV2 Plugin," because you
> won't work with every LV2 Synth Host.

Plugin author can assume that these are available:
 * the MIDI event extension
 * the Event port extension
 * the URI map extension

Plugin author can assume that one of these are available:
 * the external UI extension (toolkit agnostic, always a window)
 * the GTK UI extension (gtk specific, may be embeded)

> + Provide several MIDI in-ports for note data, and several
> audio out-ports.
> + All configuration will be done with the events extension.
> (This does not prohibit you from also doing the same over MIDI)
> + All feedback will be done with the events extension.
> + You are encouraged to create a GUI for your plugin. Its
> width shall be 200, 400, 600, or 800 pixels. Its height
> shall be a multiple of 100 pixels.

See comments for matching guidines for hosts above.

UI extensions are of course optional but hosts will handle this
gracefully anyway, as defined by LV2 itself. I.e. if plugin provides no
GUI, then host will probably use generic one (prefered) or will not
allow parameter tweak. If host does not support these GUI extensions, it
will not show the GUIs. That said, most users expect plugins to have
GUIs, and GUIs running on same host as the DSP code.

Some words about the GUI extension problems. If we want (we do, right?)
wider adoption of LV2, GUIs must be toolkit agnostic and at least C++
SDK must be provided. External UI may not be perfect but IMO (obviously)
it is the best we have in this direction. The GTK extension could be
supported automagically if plugin author inherits its GUI class from the
GTK plugin GUI base class.

proposed class hierarchy:

           lv2_plugin_base
              / \
             / \
            / \
           / \
lv2_synth_plugin lv2_effect_plugin
     | |
  mysynth myeffect

lv2_plugin_base implements the base lv2 plugin functionality
lv2_synth_plugin implements the lv2 synth functionality
lv2_effect_plugin implements the lv2 effect functionality

              lv2_ui_base
              / \
             / \
            / \
lv2_gtk_ui_base lv2_external_ui_base
        \ / | \
         \ / | \
          \ / | \
           \ / | \
            \ / | \
           lv2_gtk2_gui lv2_qt4_gui lv2_fltk2_gui
                | | |
              mygtkui myqtui mygltkui

lv2_ui_base implements the base UI extension
lv2_gtk_ui_base implements the GTK variant of the UI extension
lv2_external_ui_base implements the external variant of the UI extension
lv2_gtk2_gui implements the base functionality of a GTK GUI
lv2_qt4_gui implements the base functionality of a QT4 GUI
lv2_fltk2_gui implements the base functionality of a FLTK2 GUI

Current problems with the UI extension (both gtk and external variants):
 * there is no easy way for UI to know the sample rate
 * it is incompatible with lv2core revision 3

If new UI extension is designed, it should probably use event
ports. When the original UI extension was designed, event port extension
was not avialable.

Of course, others are free to disagree.

-- 
Nedko Arnaudov <GnuPG KeyID: DE1716B0>

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev

Received on Sun Nov 8 16:15:02 2009

This archive was generated by hypermail 2.1.8 : Sun Nov 08 2009 - 16:15:02 EET