Next  |  Prev  |  Up  |  Top  |  REALSIMPLE Top

Dynamic Level Lowpass Filter

In real strings, the spectral centroid typically rises as plucking/striking becomes more energetic. The EKS dynamic-level lowpass filter (diagrammed at the far right in Fig.4) qualitatively models this phenomenon:9

H_{L,\omega_1}(z) \;=\;\frac{1-R_L}{1 - R_Lz^{-1}}

This is another unity-dc-gain one-pole lowpass, with a pole at $z=R_L\in[0,1)$ set such that the gain is the same for all fundamental frequencies [4]. Here we will derive simplified design formulas.

Assume that the ideal continuous-time filter has the transfer function

H_{L,\omega_1}(s) = \frac{\omega_1}{s+\omega_1}
\end{displaymath} (3)

where $\omega_1 = 2\pi f_1$ denotes the fundamental frequency in radians per second. This lowpass filter has unity dc gain, $-3$ dB gain at $s=j\omega_1$, and rolls off $-6$ dB/octave for $\omega\gg\omega_1$.10It also happens to be the 1st-order Butterworth lowpass with cut-off frequency set to $\omega_1$ rad/sec. To achieve the dynamic level effect, the output of this filter is linearly panned with its input. If $x(n)$ denotes the lowpass input signal and $y(n)$ its output, then the formula is

L\cdot L_0(L)\cdot x(n) + (1-L)\cdot y(n)

where the level variable $L\in[0,1]$ may be set to achieve a desired dynamic level at the Nyquist limit, while $L_0$ controls the (lesser) attenuation at low frequencies as a function of level $L$ (e.g., $L_0(L) = L^{1/3}$). At maximum level $L=1$, the lowpass filter is bypassed. Figure 7 shows a family of filter responses at four different dynamic levels and six different fundamental frequencies.

An example GUI specification for the $L$ calculation in Faust is as follows:

  L  = hslider("dynamic_level", -10, -60, 0, 1) : db2linear;
where db2linear(x) is defined in music.lib as pow(10, x/20.0).

In [14],11the impulse-invariant and bilinear transform methods are compared for digitizing the dynamic-level analog filter Eq.$\,$(4), and the bilinear transform method was deemed preferable because it gives more attenuation of high frequencies, which helps to reduce aliasing due to later nonlinear processing. A detailed derivation can be found there. The final digital filter so designed has the transfer function

H_{L,\omega_1}(z) = \frac{\tilde{\omega_1}}{1+\tilde{\omega_1}}\frac{1+z^{-1}}{1-\left(\frac{1-\tilde{\omega_1}}{1+\tilde{\omega_1}}\right)z^{-1}}
\end{displaymath} (4)

with $\tilde{\omega_1}\mathrel{\stackrel{\Delta}{=}}\omega_1 T/2$.

Figure 6 shows a family of magnitude responses for $H_{0,\omega_1}(e^{j\omega T})$ for 6 different fundamental frequencies $\omega_1$.

Figure 6: Dynamic level lowpass filter designed by the bilinear-transform method with $L=0$. The filter amplitude response is plotted for 6 values of break frequency (50, 100, 200, 400, 800, and 1600 Hz). The sampling rate is $f_s=44100$ Hz.
\resizebox{3.3in}{!}{\includegraphics{\figdir /dynamicsfilter2.eps}}

Figure 7: Dynamic level lowpass filter responses as in Fig.6, but with $L=0.001$, $0.01$, $0.1$, and $0.32$, corresponding to desired Nyquist-limit levels of $-60$, $-40$, $-20$, and $-10$ dB, respectively. The dc level is defined to be one-third the Nyquist-limit level.
\resizebox{3.1in}{!}{\includegraphics{\figdir /dynamicsfilterL.eps}}

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