[LAD] Design of similar LV2 plugins

From: Aurélien Leblond <blablack@email-addr-hidden>
Date: Sun Nov 30 2014 - 14:31:43 EET

While porting AlsaModularSynth modules to LV2 plugins, I was wondering
something... AMS has some similar modules where the only thing changing is
 the number of inputs (Mixer with 2, 4 or 8 inputs), the number of outputs
(CV source with 2, 4 or 8 outputs) or the number of VCOs/Envs/etc.
(DynamicWaves with 4, 8 or 16 VCOs).

In AMS there is only one class for such plugins and AMS would pass the
number of inputs/outputs/sections/etc. when creating the different modules.
I couldn't find an easy way to reproduce this in LV2 plugins, therefor so
far I have been creating different LV2 plugins for each and everyone of
them and doing a lot of copy/past/editing.

That let me to wonder if there wouldn't be a better way.

The pros:
- it's easier to maintain if I have only one class
- it's a lot less boring than doing a lot of copy/past/editing - I have
been doing it only for simple ones so far like Mixers or CV source, but now
I'm starting to port DynamicWaves which is way more complex

The Cons:
- I have the feeling that gaining on code simplicity actually decrease the
performance when the plugin is running - i can imagine it to be less
strainuous on the CPU to have simple code instead of dealing with loops and
arrays

Being a rare case I can't imagine the need to have this supported directly
in LV2, but I was wondering if people with more talent than me in creating
audio software might have some advice?

Aurélien

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sat Dec 6 04:15:02 2014

This archive was generated by hypermail 2.1.8 : Sat Dec 06 2014 - 04:15:02 EET