[LAD] Plugin block length restrictions

David Robillard d at drobilla.net
Sun Oct 21 23:15:32 UTC 2012

On Sun, 2012-10-21 at 21:10 +0000, Fons Adriaensen wrote:
> On Sun, Oct 21, 2012 at 04:24:16PM -0400, David Robillard wrote:
> >  * Fixed and power of two can be difficult or impossible to implement,
> >    and are not useful, so hosts should not bother trying to implement
> >    either (except where it is trivial), and plugins should not expect
> >    them to.
> Neither fixed nor power-of-2 are strictly required for zero-latency
> convolution although they make it somewhat easier to implement. For
> the simple reason that convolution is not a block processing algorithm
> in the first place, even if the most efficient implementations use block
> processing.  The next N output samples depend only on the next N input
> samples (and previous ones) for any value of N. So it is always possible
> to allow a call to process() for an arbitrary N samples.

Well, in practice arbitrary within a range, e.g. implementations may not
be able to sanely deal with N = 1.

> That does not mean that there are no real block processing algorithms,
> which do not share the property mentioned above, and which require a
> fixed M of input samples even to produce a single output sample. Not
> because of the implementation but because of the nature of the algorithm
> itself. For example most of the processing inside JAMIN is of that type,
> as will be almost all algorithms that perform spectral processing, e.g.
> time stretching, morphing, and the like.
> Given that, claiming that fixed and power-of-2 block sizes are 'not
> useful' is a mistake. And for real block-oriented algorithms, processing
> a block is an atomic operation, and it would be futile to try and change 
> a parameter value anywhere except on a block boundary anyway.

(I guess I should just skip the part where I bother asking entirely and
jump straight to the dubious claims.  Much more effective.)

Well, this effort which you have so vehemently attacked was an effort to
establish this functionality in hosts.

However, since convolution does not need it, as you have pointed out, I
no longer plan to waste my time implementing either fixed or power of 2
in Ardour until there is a tangible reason to do so, and I doubt anybody
else will waste their time either.  Tangible means plugin code.

Progress happens by people writing plugins, and the spec/hosts adapting
to accommodate their needs.  All this mailing list bullshit is just a
waste of time.  Serves me right for attempting to address needs that do
not actually exist.

Both features remain trivially supported in Jalv which can serve as a
test host for anyone interested in writing such plugins.  If, and only
if, someone does, it will no longer be a waste of time to support them
in other hosts where it is more difficult.

-dr (who will think twice before posting to this toxic wasteland again)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20121021/2c1b8ba7/attachment.pgp>

More information about the Linux-audio-dev mailing list