Hi all,
It appears as though LADSPA at the moment lacks a means to provide
names for control values (this topic has probably crossed the list
before so I'll try to keep it short).
The common solution for this problem (e.g. as used in Steve Harris'
plugin collection) is to use an integer control port to encode for the
different options that the port can have, then add some text to the
PortName to describe those options (e.g. "1=sin, 2=saw, ...").
This has a few drawbacks though. First, it doesn't really solve the
original problem; the user is still inputting ordered numeric values,
even though the relationship that is being modeled can be totally
arbitrary. Second, it makes for very long PortNames, which causes
layout troubles.
Therefore (if such a thing does not already exist) I propose to extend
the LADSPA specification with a convention: if a PortName matches the
following regular expression: .+ \((\d+=.+,)*(\d+=.+)+\) (in words:
any sequence of characters following by a '(', followed by one or more
comma-separated 'value'='name' pairs, followed by a ')'), then
the
host may assume that the given values map onto the given names and
display them as such. In addition, the host may suppress displaying
the '(...)' part of the PortName.
This proposal follows current best practices, requires no
modifications to the LADSPA protocol or data structures, is easy to
implement, and highly unlikely to adversely affect any existing
plugins/hosts.
Any comments?
Pascal.
--
The GNOME U sound editor:
http://awacs.dhs.org/software/gnusound