When the delay-line lengths need to be varied in real time, or
interactively in a GUI, it is convenient to choose each delay-line
length
as an integer power of a distinct prime number
[457]:
where we call
![$ m_i\ge 1$](http://www.dsprelated.com/josimages_new/pasp/img803.png)
the ``multiplicity'' of the prime
![$ p_i$](http://www.dsprelated.com/josimages_new/pasp/img301.png)
. With
this choice, the delay-line lengths are always coprime (no factors in
common other than
![$ 1$](http://www.dsprelated.com/josimages_new/pasp/img138.png)
), and yet we can lengthen or shorten each delay
line individually (by factors of
![$ p_i$](http://www.dsprelated.com/josimages_new/pasp/img301.png)
) without affecting the mutually
prime property.
Suppose we are initially given desired delay-line lengths
arranged in ascending order so that
Then good prime-power approximations
![$ \hat{M}_i$](http://www.dsprelated.com/josimages_new/pasp/img801.png)
can be expected using
the prime numbers in their natural order:
Since
![$ \hat{M}_i=p_i^{m_i} \,\,\Rightarrow\,\,\log(\hat{M}_i) = m_i \log(p_i)$](http://www.dsprelated.com/josimages_new/pasp/img806.png)
(for any
logarithmic base), an optimal (in some sense) choice of prime
multiplicity
![$ m_i$](http://www.dsprelated.com/josimages_new/pasp/img653.png)
is
![$\displaystyle m_i
\isdefs$](http://www.dsprelated.com/josimages_new/pasp/img807.png)
round
where
![$ M_i$](http://www.dsprelated.com/josimages_new/pasp/img38.png)
is the desired length in samples. That is,
![$ m_i$](http://www.dsprelated.com/josimages_new/pasp/img653.png)
can be
simply obtained by
rounding
![$ \log(M_i)/\log(p_i)$](http://www.dsprelated.com/josimages_new/pasp/img809.png)
to the
nearest integer (max 1). The prime-power delay-line length
approximation is then of course
and the multiplicative approximation error is bounded by
![$ p_i^{\pm1/2}$](http://www.dsprelated.com/josimages_new/pasp/img811.png)
(when
![$ M_i\ge\sqrt{p_i}$](http://www.dsprelated.com/josimages_new/pasp/img812.png)
).
This prime-power length scheme is used to keep 16 delay lines both
variable and mutually prime in Faust's reverb_designer.dsp
programming example (via the function prime_power_delays in
effect.lib).
Next Section: Conformal Map Interpretation of Damping SubstitutionPrevious Section: Mode Density Requirement