[LV2] Thoughts of a lazy developer: Audio vs CV
blablack at gmail.com
Mon Jul 1 05:35:03 PDT 2013
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
> 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?
More information about the Devel