Next  |  Prev  |  Up  |  Top  |  REALSIMPLE Top


Tuning the EKS String

At low sampling rates and/or high fundamental frequencies, the string simulation can sound ``out of tune'' because the main delay-line length $N$ is an integer, which means that the fundamental frequency $F_0$ is quantized to values of the form $F_0=f_s/(N+N_f)$ where $f_s$ is the sampling rate and $N_f$ is the delay (in samples) of any filters in the feedback loop. For example, in Fig.4, $N_f$ equals the combined delay of filters $H_d(z)$, $H_s(z)$, and $H_\eta(z)$. In Eq.$\,$(1), we had the digitar tuning formula $F_0 = f_s/(N+1/2)$ because $N_f=1/2$ is the phase delay of the two-point average $y(n)=[x(n)+x(n-1)]/2$ used in the KS digitar algorithm.

In this section, we look at designing a tuning filter $H_\eta(z)$ so as to fine-tune the fundamental frequency as desired (even at low sampling rates). Keep in mind, however, that such a filter is not needed when the sampling rate is sufficiently high compared with the desired fundamental frequency.

For simplicity, here we will use the two-zero damping filter described in §3.4, so that its phase delay is always one sample. The tuning formula becomes

\begin{displaymath}
F_0 = \frac{f_s}{N+1+\Delta_\eta(\omega)},\mbox{ or }
\fbox{$\displaystyle \Delta_\eta = \frac{f_s}{F_0} - N - 1,$}
\end{displaymath} (5)

where

\begin{displaymath}
\Delta_\eta(\omega)\mathrel{\stackrel{\Delta}{=}}-\frac{\angle H_\eta(e^{j\omega T})}{\omega T}
\end{displaymath}

denotes the phase delay of the tuning filter $H_\eta$ in samples.



Subsections
Next  |  Prev  |  Up  |  Top  |  REALSIMPLE Top

Download faust_strings.pdf

``Making Virtual Electric Guitars and Associated Effects Using Faust'', by Julius O. Smith III,
REALSIMPLE Project — work supported in part by the Wallenberg Global Learning Network .
Released 2013-08-22 under the Creative Commons License (Attribution 2.5), by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA