[LV2] Question on schedule_work
d at drobilla.net
Tue Jun 19 07:07:50 PDT 2018
On Mon, 2018-06-11 at 09:52 -0500, Spencer Jackson wrote:
> On Sun, Jun 10, 2018, 5:58 PM Phyllis Smith <phylsmith2004 at yahoo.com>
> > Hi, we are the Cinelerra-gg developer (GoodGuy) and lovely-
> > assistant (PhylSmith) team and have just finished phase 2 of
> > hooking up some LV2 plugins to this NLE -- "Phase 1 Proof of
> > Concept".
> > This is really amazing. Over 500 plugins load. Some of them cause
> > problems, but the percentage which are loading and the percentage
> > that actually perform is pretty impressive. Good work to all of
> > the LV2 programmers!
> Congrats to you too! That's great.
> > But having difficulty with knowing how to test schedule_work. Is
> > there a plugin that uses schedule_work in an obvious way what does
> > not involve using a MIDI or does this thing need a MIDI to be
> > tested?
> It doesn't need midi. The most common use that I know of in plugins
> is for disk operations which are never realtime safe. Naturally
> samplers are a common use case but they also use midi typically. I
> know my rakarrack ports of rkr echotron and rkr reverbtron (https://g
> ithub.com/ssj71/rkrlv2) are loading files that only affect the audio
> processing, without any midi at all. They are however not very tested
> so there may be other issues. I believe Robin's convolver would be a
> better reference with a similar mechanism
> Note that all these require atoms and patch extensions to communicate
> to the dsp which file to load. File loading is not the only use of
> the worker thread but it's the only one I know examples of.
I don't know of any either. It would be a bit strange, since that
would mean a plugin is scheduling non-RT work based on only audio
input. The worker extension isn't inherently tied to events, but is
mainly only useful for plugins that use events.
Your best bet, assuming you can ship events at least between custom UIs
and the plugin, would be a plugin that does this via its UI
so you don't have to implement a specific protocol in the host. eg-
sampler is another example of this in addition to the above.
Though I should add, in general, it is best to implement features with
some specific goal in mind, e.g. a specific plugin that you want to get
working. The worker extension is good and useful, but in general you
should *not* try to implement every single thing in LV2 just because
its there. Some are only really useful for particular circumstances
that may not suit your host (and some are unfortunately a bit rotten
and not used much at all)
More information about the Devel