[linux-audio-dev] ladspxmlgui needs numeric input controllers

Peter Eschler peschler at t-online.de
Tue May 13 19:51:01 UTC 2003


Hi,

i'm new to this list but tried to catch up by reading the archives. I'm 
currently playing around with a gui-backend based on Qt which uses the 
proposed ladspaxmlgui.dtd.

If have some questions concerning the controller element.

<!ELEMENT controller (graphics-context?)>
<!ATTLIST controller
	port CDATA #REQUIRED
	label CDATA #IMPLIED
	label-position (top | bottom | left | right | upper-left | upper-right | 
lower-left | lower-right) "top"
	type (knob | hslider | vslider | spinner | image) "knob"
	image-regexp CDATA #IMPLIED
>

First, what is the label intended to contain ?
 - the port name
 - user definable text
 - the port value 
  
Second, imagine a normal slider or knob in an everyday plugin. Surely it is 
fine to use the slider/knob to go wild changing the value interactively. But 
what if i want to specify a value precisely . Fiddling around with my mouse 
until i managed to set the desired value ? What if, even worse, the gui 
doesn't snap to my value according to pixel inaccuracy. 
IMHO the solution to this problem is a numeric input for LADSPA_Data values, 
that could be placed above/below/... the slider to display and edit the 
value. In fact the input could be placed everywhere in the gui, theres no 
actual connection between them apart from the numeric input being attached to 
the same port as the slider is. Is this possible (dont see why it shouldn't) 
?
The numeric input might be usable not only in combination with a slider, but 
also as a standalone controller. 

Thus i propose an additional control element of type "numinput". 

One problem arising from the slider example (and not when used standalone) is 
:
If used in the way described above (slider + numinput below) we have a label 
for both controls. What to do with these two ? According to the documentation 
in the dtd, the label "should always be supplied for user-convenience". The 
solution in this case might be to add the attribute "none" to the 
label-position attribute list. According to the comments in the dtd this is 
one of the rare situation one of the labels is optional. 
   
To put this altogether my controller element section would look like this:

<!ELEMENT controller (graphics-context?)>
<!ATTLIST controller
	port CDATA #REQUIRED
	label CDATA #IMPLIED
	label-position (none | top | bottom | left | right | upper-left | upper-right 
| lower-left | lower-right) "top"
	type (knob | hslider | vslider | spinner | image | numinput ) "knob"
	image-regexp CDATA #IMPLIED
>   

There might arise questions about display precision for float values, but i 
would leave this up to the gui element itself. In my Qt implementation i 
adopt the number of decimal places according to the value displayed. The 
larger the absolute value the lesser decimal places ( e.g.: 1.214, -10.23, 
935.3, 16003 );

Comments are welcome.
//Peter

-- 
 "Without music, life would      _O_/ \_O_/ +----------------------+ 
  be a mistake - I would        / ))    []  | Peter Eschler        |
  only believe in a god who       \\    //  | peschler at t-online.de |
  knew how to dance." (Nietzsche) //    \\  +----------------------+




More information about the Linux-audio-dev mailing list