Re: [LAD] [ALPHA] ladspa.m.lv2 - Some questions :D

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: hermann meyer <brummer-@...>
Cc: <linux-audio-dev@...>
Date: Thursday, May 9, 2013 - 8:47 pm

--=-YKclCwFp2rpAk/qFvlZw
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, 2013-04-23 at 12:47 +0200, hermann meyer wrote:
[...]

=20
=20
=20

(Sorry for the late reply, I don't monitor LAD very closely these days)

You should be able to handle all the events in one loop.

However here you seem to be iterating over all events *for every frame*?
That would cause a problem with loading since you'll issue a ton of
identical load requests, but it also probably isn't what you want for
MIDI either. You'll trigger everything repeatedly and the timing is
wrong. I think you need to unify your two loops here.

The general pattern for sample-accurate event receiving is work through
time in the event loop, outputting everything up to the current event.
So you start with t=3D0. The next event loop in the loop is at t=3D5, so
render the output for 0..5, process the event (to e.g. trigger a voice
or whatever), then continue. After the loop output everything from the
last event to the end of the cycle.

So your event processing loop is your processing loop, and proceeds in
'chunks' delimited by events.

The magic of the worker extension is you can do non-RT things like load
new sample banks, which will happen RT-safe (with latency) if running
realtime, but if freewheeling (e.g. for export) the scheduled work will
execute immediately/synchronously. Thus you can get sample accurate
exporting, e.g. with a patch load at t=3D0 and a note on at t=3D1 the note
is guaranteed to play with the new patch (in the export). You don't
need to worry about this, but it's why things are the way they are...
plus it's pretty cool :)

Hopefully that makes sense, the simplest example of how to do this is in
the metro example:

http://lv2plug.in/browser/trunk/plugins/eg03-metro.lv2/metro.c#L296

tl;dr: Do that :)

-dr

--=-YKclCwFp2rpAk/qFvlZw
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAABCAAGBQJRjAs7AAoJEDZyeCqb82jz5iIQAMKunymHxn7zs9RlyrOYAIpZ
SXoI3SO1/KYs5If3+kkAu5jg7HlB688Bktv6FQcqnZ0dqDaQ/tKfMagy+1jtfm3v
jzgj7DkLJ2c6zc3aSnLZ/GPaywPGT+ocn0yXiBQGfByWwOdgPPwFRQ5F3GQtI5V+
lBIG8BCpfSbDrjLkSggzdEorZNckScGTjRXvP/BLgPsgDNmL6zhLtIhVcwQ3/IDh
aRb2hO1BFnmE7cyER01DmootVCf6ZoYvwQGkQj6iqHNQfRuJXaIFwwiPT3h/cuQR
0G+957xNZNd7ltm1fSfghs2ZDr1JhX6HsI8SnH41NHbo8QAAjETL5eHm6XS3mPR/
DD/cpZhiDTkjyMaDmSqsYfKU54n3N5kE3seHZ90CaqWg7fLEs3Cohf3P0LsrfQuy
HyJKc1qDCty3Gam+KyVR9plcy8gIFgz36gpnjL26Kzeea70fdO/VrNKTML+JTJ00
ME8dL43B1cGWqgqbQYkbLDq1SwqY3W4dSewicrn7EmJcwRY5g0kpWXREo6DAgAaa
Tm0lhnNhH9NJFSTJLCIDd3MxdhGLvfTrbkTdCp3zh4z4JG6PfJCLcugLmYTuo24F
5OtkAMEtGzmaBVkrEE1lLguoIKUR9H1c2g2qBy/shjGSkbv17Uo8xwPyPuaJPliC
QVRXkg5ZoTsSVtlqjaem
=Nkn9
-----END PGP SIGNATURE-----

--=-YKclCwFp2rpAk/qFvlZw--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] [ALPHA] ladspa.m.lv2 - Some questions :D, Florian Paul Schmidt, (Mon Apr 22, 5:33 am)
Re: [LAD] [ALPHA] ladspa.m.lv2 - Some questions :D, hermann meyer, (Tue Apr 23, 10:47 am)
Re: [LAD] [ALPHA] ladspa.m.lv2 - Some questions :D, David Robillard, (Thu May 9, 8:47 pm)
Re: [LAD] [ALPHA] ladspa.m.lv2 - Some questions :D, Florian Paul Schmidt, (Thu May 9, 9:02 pm)
Re: [LAD] [ALPHA] ladspa.m.lv2 - Some questions :D, David Robillard, (Thu May 9, 9:16 pm)
Re: [LAD] [ALPHA] ladspa.m.lv2 - Some questions :D, Florian Paul Schmidt, (Thu May 9, 9:25 pm)
Re: [LAD] [ALPHA] ladspa.m.lv2 - Some questions :D, Florian Paul Schmidt, (Tue Apr 23, 11:38 am)
Re: [LAD] [ALPHA] ladspa.m.lv2 - Some questions :D, hermann meyer, (Thu Apr 25, 6:00 am)