Sign in

username:

password:



Not a member?

Search Online Books



Search tips

Free Online Books

Ads

Chapters

See Also

Embedded SystemsFPGAElectronics
Chapter Contents:

Search Physical Audio Signal Processing

  

Book Index | Global Index


Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?

  

Prime Power Delay-Line Lengths

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 $ \hat{M}_i$ as an integer power of a distinct prime number $ p_i$ [457]:

$\displaystyle \hat{M}_i \isdefs p_i^{m_i}
$

where we call $ m_i\ge 1$ the ``multiplicity'' of the prime $ p_i$. With this choice, the delay-line lengths are always coprime (no factors in common other than $ 1$), and yet we can lengthen or shorten each delay line individually (by factors of $ p_i$) without affecting the mutually prime property.

Suppose we are initially given desired delay-line lengths $ M_i$ arranged in ascending order so that

$\displaystyle M_1 < M_2 < \cdots < M_N.
$

Then good prime-power approximations $ \hat{M}_i$ can be expected using the prime numbers in their natural order:

$\displaystyle p_i \in \{2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,\ldots\}
$

Since $ \hat{M}_i=p_i^{m_i} \,\,\Rightarrow\,\,\log(\hat{M}_i) = m_i \log(p_i)$ (for any logarithmic base), an optimal (in some sense) choice of prime multiplicity $ m_i$ is

$\displaystyle m_i
\isdefs$   round$\displaystyle \left[\frac{\log(M_i)}{\log(p_i)}\right]
\isdefs \left\lfloor 0.5 + \frac{\log(M_i)}{\log(p_i)}\right\rfloor.
$

where $ M_i$ is the desired length in samples. That is, $ m_i$ can be simply obtained by rounding $ \log(M_i)/\log(p_i)$ to the nearest integer (max 1). The prime-power delay-line length approximation is then of course

$\displaystyle \hat{M}_i \isdefs p_i^{m_i},
$

and the multiplicative approximation error is bounded by $ p_i^{\pm1/2}$ (when $ M_i\ge\sqrt{p_i}$).

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).


Previous: Mode Density Requirement
Next: Achieving Desired Reverberation Times

Order a Hardcopy of Physical Audio Signal Processing


About the Author: Julius Orion Smith III
Julius Smith's background is in electrical engineering (BS Rice 1975, PhD Stanford 1983). He is presently Professor of Music and Associate Professor (by courtesy) of Electrical Engineering at Stanford's Center for Computer Research in Music and Acoustics (CCRMA), teaching courses and pursuing research related to signal processing applied to music and audio systems. See http://ccrma.stanford.edu/~jos/ for details.


Comments


No comments yet for this page


Add a Comment
You need to login before you can post a comment (best way to prevent spam). ( Not a member? )