[Devel] OutputPort being ControlPort

David Robillard d at drobilla.net
Fri Aug 5 08:55:49 PDT 2011

On Mon, 2011-08-01 at 19:49 -0500, Gabriel Beddingfield wrote:
> On 07/31/2011 07:05 AM, Aurélien Leblond wrote:
> > Hi,
> >
> > I'm working on porting the AMS internal modules into LV2 plugins to be
> > used in Ingen.
> Cool!
> > The few examples of LV2 plugin around uses AudioPort as OutputPort..
> > Building my plugins like that works fine, but I'm not sure it makes
> > sense for a simple plugin like a LFO.
> >
> > I have tried to make the OutputPort a ControlPort, but then get a Seg Fault.
>  From the docs:
> lv2:AudioPort is a pointer to an array of floats.
> lv2:ControlPort is a pointer to a single float.
> I'm guessing that your code segfaults because it treats lv2:ControlPort 
> as an array (buffer).
> lv2:OutputPort and lv2:InputPort are /modifiers/ to a port.  They don't 
> specify the type... just who is expected to write to the port.
> > My questions are:
> > - Am I on the good track trying use ControlPort for OutputPort?
> > - If so, is there any known examples I can have a look at?
> AMS has a port type that acts like the old-style "control voltage" used 
> in analog synths.  Is this what you're trying to find?
> This is similar to an lv2:AudioPort (an array of values that correspond 
> to time).  However, for an lv2:AudioPort the data is expected to be PCM 
> data.  Also, often a control voltage port is done at 1/16th the sample rate.
> What you need is a /new/ type of port... which I would call a "Control 
> Voltage" port... which is also an array of floats.  AFAIK, no-one has 
> yet established such a port.

Yes, we really need CV.  One possible option would be to make the port
*both* AudioPort and ControlPort, though this might break existing

Personally (with an admitted modular bias) I consider this a major flaw
of LADSPA, and since the scope of these ports is clearly within that of
LADSPA and core LV2, but kludges are necessary which ruin user
experience, I think a proper solution to this problem such as an
lv2:CVPort is within the scope of the core specification.


More information about the Devel mailing list