On Tue, Jun 30, 2026 at 09:00:29PM +0200, Matthias Geier wrote:

> In the comments of the live stream there were a few questions and
> complaints that I would like to discuss here.

I was the one who posted those comments.

First of all, my remark that your solution was 'partially wrong'
was itself wrong. Sorry for that. I didn't have the paper available
then, the live stream was freezing all the time and audio quality
was poor so I probably misunderstood some of what you presented.

But now that I have read the paper I stand by the other comments
I made. Which amounted to "Why on earth does anyone require a full
paper to present something as simple as

min_delay = P - gcd (H,P)

where H and P are the host and plugin block sizes.

You really don't need pages of maths to find this out.
A bit of doodling on squared paper (similar to your fig. 1)
is all that is required. 

Assume for a moment that g = gcd (H,P) = 1.

It's easy to see that in that case

Delta (k) = (k * H) mod P,  k = 0...P-1

will take on all values in 0...P-1 exactly once.

So you'll have to accept a delay of P-1 samples.

Now if g > 1, consider the buffer sizes

H' = H / g
P' = P / g

with one 'element' in each consisting of g samples,
and H' and P' being coprime.

So the required delay will be P'-1 elements, or
(P'-1) * g samples, which is equal to P - g samples.

QED. This is just Bézout's lemma in different words.

The reason you won't find many papers about this is simply
that anyone with a bit of basic math knowledge can work
this out in a few minutes. It's easier than finding out the
classical way to solve a quadratic equation, and you won't
find many papers about that either - it's considered basic
knowledge, at least for anyone dabbling with computers and
DSP algorithms.


Now if you like this sort of problems, here are a few
that may be a bit more challenging.

* The plugin can work only with one blocksize and sample
  rate, so you need not only to buffer but also resample
  at the input and output.

  - What is the minimal delay and how to achieve it.
  - How to synchronise the two resamplers so that the
    output sample rate exactly matches the input,
    without roundoff errors resulting in accumulating
    drift.

* Same situation, but the combination of resamplers and
  plugin must be able to accept a variable number of
  samples in for each process() call, even if internally
  the plugin has to use a fixed blocksize (e.g. for FFT
  based processing).


Caio,

--
FA

Reply via email to