[LV2] LV2 Question

Warren Koontz profwub at gmail.com
Thu Nov 21 06:44:41 PST 2013


I am re-sending this, having joined the list.

Dear LV2 Team,

I am trying to create a reverb plug-in a la LV2 for Audacity by modifying
the amplifier example (amp.c etc.) and have a question.

My reverb is implemented as a C++ class named Multiverb. From my current
understanding of LV2 (and LADSPA), it appears that I should instantiate a
Multiverb object in "activate", apply it in "run" and delete it in
"deactivate". So the object needs to be accessible in all three functions.
I see two ways to do this:


   1. Declare a pointer to a Multiverb object as a static variatle (static
   Multiverb *revMono) near the top of the file containing the LV2
   functions.
   2. Declare a pointer to a Multiverb object as a member of the same
   structure that contains the port variables.

I also need to have access to the sampling rate, which I can get when
"instantiate" is called. I can also save this as a static or a member of
the above mentioned structure.

Which of these is preferable or is there a better way?

Thanks.

Warren Koontz
Professor Emeritus
Rochester Institute of Technology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lv2plug.in/pipermail/devel-lv2plug.in/attachments/20131121/846dab8c/attachment.htm>


More information about the Devel mailing list