[LV2] Ui update rate

David Robillard d at drobilla.net
Mon May 6 15:31:57 PDT 2013


On Sat, 2013-05-04 at 19:38 +0200, hermann meyer wrote:
> Am 30.04.2013 16:10, schrieb Harry van Haaren:
> > On Tue, Apr 30, 2013 at 3:00 PM, hermann meyer <brummer- at web.de 
> > <mailto:brummer- at web.de>> wrote:
> >
> >     Is there a way to receive the UI refresh rate from the host? 
> >
> > Currently, no there is not, if you're using the LV2UI_Idle_Interface 
> > to redraw your UI?
> >
> >     It could be helpful to now this for analyze plugs.
> >
> > I'll agree, there are many use cases where intended framerate of UI 
> > would be useful.
> > Most are for eye candy.. but your analyze plugs are a better example 
> > where its needed ;)
> Eye candy is as well a other side of the strip, and I wouldn't put it 
> such below then a analyzer plug.
> If LV2 ever would be a competitor to other plugin standards (and I 
> really hope it will), we need a better way to redraw the UI. Be it for 
> eye candy, for analyze, or for user feedback.
> At minimum as a plug-in developer I need to know the UI refresh rate, 
> otherwise any calculation to give users a feedback running into a hole. 
> And it didn't differ here if it be just a eye-candy or the calculation 
> of a fallback parameter from a simple VU meter.

Anything that assumes a constant refresh rate would be wrong anyway.
While there is a target rate the host uses (30Hz in everything I know of
right now, for the idle interface), you can't assume you actually get
actually 30Hz.  Even if it's roughly right it will drift significantly
very quickly.

In short, the refresh rate is not constant.  Even the audio callback
rate isn't constant, the UI one is *really* not constant.

The correct thing to do when you need time information for drawing is to
get the actual current time, store it, and compare with the last time.

-dr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lv2plug.in/pipermail/devel-lv2plug.in/attachments/20130506/9ac49113/attachment-0002.pgp>


More information about the Devel mailing list