[LV2] Thoughts of a lazy developer: Audio vs CV

Aurélien Leblond blablack at gmail.com
Mon Aug 26 09:13:53 PDT 2013

Hello David,

So I have been coding more of the avw.lv2 plugins, I realised that the
issue with CVPort/AudioPort inputing/outputing the same data is really
for very very few plugins - thinking about it, I realised you wouldn't
really encounter it in other cases than modular synths.

So although it might be a pain for the few developers who might
encounter the case:
- I guess on your side the code remains simpler
- For users playing with modular synths, as long as the name of the
plugin is clear enough to indicate what they do, it shouldn't be an

Let me know what you think about it, but it might simply not be worth it.


On Mon, Jul 1, 2013 at 1:35 PM, Aurélien Leblond <blablack at gmail.com> wrote:
> lacking in host support or in the lv2 definition itself?
> http://lv2plug.in/ns/lv2core/#CVPort says "It is generally safe to
> connect an audio output to a CV input, but not vice versa. Hosts
> SHOULD take care to prevent data from a CVPort port from being used as
> audio" but that's not exactly true.
> - In my VCO example, I could have used the VCO Audio output as my CV
> FM input, that fits with the case above
> - To create a tremolo that varies in time, I use a combination of
> Envelope, VCA and LFO... VCA at the moment only accepts Audio input,
> when my LFO is CV output
> The way I see it:
> - in the lv2 definition, the input/output port type could be the same
> for both CV and Audio
> - for this type, a mandatory lv2 property defines what the output can
> be used for (CV, Audio or Both) or what the input can receive (CV,
> Audio or both)
> - that would work pretty well for VCO (output can be used for both CV
> and Audio), LFO is only a CV output, etc
> - the complicated case is the VCA:
>      - input and output can both be CV/Audio but have to be "in sync"
>      - if I plug a LFO as input (CV only), the output can only be used
> for CV as well
>      - if I use an audio sampler as source (Audio only), the output
> can only be used as Audio
>      - if I plug a VCO (output both CV and Audio), the output of the
> VCA can then be used for both CV/Audio
> But I don't know how feasible that is.
> On Sat, Jun 29, 2013 at 7:54 PM, David Robillard <d at drobilla.net> wrote:
>> On Wed, 2013-06-26 at 21:41 +0100, Aurélien Leblond wrote:
>>> While playing with the avw.lv2 plugins, I noticed something annoying:
>>> - I have a VCO that outputs audio, but now need the exact same one that
>>> outputs CV
>>> - same with a VCA that inputs/outputs audio, but realise that I need the
>>> same plugin but with CV
>>> Now it's not much of a problem, I copy/paste the code, create a new plugin
>>> and change the ttl but this makes me wonder:
>>> - should I be changing something more? In the case of the VCA, the code is
>>> exactly the same, only the ttl is slightly different (change of
>>> input/output port type). Is there something I'm forgetting?
>>> - if not, is there a better way to do this instead of simply duplicating
>>> the code?
>>> - finally, should there really be 2 plugins if the way they work is the
>>> same, they are doing exactly the same thing, just the port type is
>>> different?
>> Since CV and audio are exactly the same in the binary sense, this really
>> seems like something you should never have to do.  Sounds like lacking
>> host support?
>> -dr

More information about the Devel mailing list