Re: [linux-audio-dev] ladspa plugin GUI proposal

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] ladspa plugin GUI proposal
From: Paul Barton-Davis (pbd_AT_Op.Net)
Date: Wed May 24 2000 - 20:02:09 EEST


OK, when I consider your pixmap example given your explanation, it
seems fairly nice.

What would make sense to me is an XML spec that does some of what
vstGUI does, plus allows the host to do its own thing if it wants
to. The key difference with your example is that the pixmaps used are
specified in sets using regular expressions, rather than assuming that
you just move a given pixmap around. This is more generic than the
motion-based assumption, because knobs require rotation which is not
easily accomplished.

I have also learnt from the Quasimodo experiment that there is no such
thing as a "scrollbar" or "knob", but merely "controls". This is
echoed in vstGUI as well; given that this makes 2 independent
discoveries of the same idea, I think there is good evidence for
believing it.

So, I would think of something like this:

<!ELEMENT pixmaps EMPTY>
<!ATTLIST pixmaps
          path CDATA #REQUIRED
>

<!ELEMENT controller EMPTY>
<!ATTLIST controller
        pixmap_regexp CDATA #REQUIRED
        xpos CDATA #REQUIRED
        ypos CDATA #REQUIRED
        label CDATA #IMPLIED
        label_position (top | bottom | left | right | upper_left | upper_right | lower_left | lower_right) "top"
        param CDATA #IMPLIED
        start CDATA "0"
        end CDATA "1"
        step CDATA "0.01"
        page CDATA "0.1"
>

thus, we'd have examples like:

<pixmaps path=".:/usr/local/audio/pixmaps:/usr/local/music/quasimodo/pixmaps"/>

<controller
        pixmap_regexp="big-fat-sliders-[0-9]+.xpm"
        xpos=42
        ypos=32
        label="My Big Fat Slider"
        label_position=upper_right
        param=2 <<<< the port ID
        start=0
        end=9999
        step=1
        page=100
/>

This is, I think, a completely generic description of any controller,
and it can be implemented pretty easily in any toolkit, I think. The
vstGUI case convinces me that this could be implemented under most, or
all, other OS/GUI systems as well.

Experience with Quasimodo suggests to me that in addition to a
controller, we also need:

    soundfile selectors
    oscilloscopes
    curve displays/editors

there are other types in Quasimodo, but they could, if we want to
limit the set of elements in the same way that vstGUI does, be
implemented as controllers. For example, Quasimodo has:

<!ELEMENT pushbutton (state)+ >
<!ATTLIST pushbutton
        xpos CDATA #REQUIRED
        ypos CDATA #REQUIRED
        label CDATA #IMPLIED
        label_position (top | bottom | left | right | upper_left | upper_right | lower_left | lower_right) "top"
        param CDATA #IMPLIED
        trigger CDATA #FIXED "restart"
>

this one is easily handled explicitly as

<controller
        pixmap_regexp="pushbutton-state-[0-9]+.xpm"
        .
        .
        .
/>

There would most likely just be two pixmaps matching that regexp.

This one is more of pain:

<!ELEMENT multiway (state)+ >
<!ATTLIST multiway
        xpos CDATA #REQUIRED
        ypos CDATA #REQUIRED
        label CDATA #IMPLIED
        label_position (top | bottom | left | right | upper_left | upper_right | lower_left | lower_right) "top"
        param CDATA #IMPLIED
        trigger CDATA #FIXED "restart"
>

In Quasimodo, it typically displays some kind of text entry box, and
when you click on it in various ways, it shifts the parameter up or
down, redisplaying the new value (which might be a number, name,
whatever) at the right time. Doing this with pixmaps seems pretty
silly for some things - e.g. a frequency display with 10K values :) So
perhaps we could also use a specific XML element for this kind of
thing.

Then we have:

     some_xml_type *(*get_gui_template)(LADSPA_Handle);

as part of the plugin. If it returns NULL, the plugin doesn't have any
particular ideas about its own GUI, and the host should do its best.

---- IMPORTANT ----
the host can COMPLETELY IGNORE all this if it wants to build the GUI
itself.
-------------------

What do you think ?

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed May 24 2000 - 20:41:59 EEST