You are on page 1of 9

Signal Processing Libraries for Faust

Julius SMITH
Center for Computer Research in Music and Acoustics (CCRMA)
Music Dept., Stanford University
Stanford, CA 94306,
USA
jos@ccrma.stanford.edu
Abstract
Signal-processing tools written in the Faust lan-
guage are described. Developments in Faust libraries,
oscillator.lib, filter.lib, and effect.lib since
LAC-2008 are summarized. A good collection of sinu-
soidal oscillators is included, as well as a large variety
of digital lter structures, including means for specify-
ing digital lters using analog coecients (on the other
side of a bilinear transform). Facilities for lter-bank
design are described, including optional delay equal-
ization for phase alignment in the lter-bank sum.
Keywords
Faust, audio signal processing, lters, eects, oscilla-
tors
1 Introduction
The Faust (Functional AUdio STream) language,
developed at GRAME
1
[1; 2], is well known for its
compact specication of signal-processing block
diagrams, and its compilation into ecient C++
audio applications and plugins. Thanks to the
use of architecture les that encapsulate platform-
specic details, Faust applications can be conve-
niently generated for a wide variety of host envi-
ronments (Linux, Mac, Windows), and audio plu-
gins can be generated for a wide variety of host ap-
plications such as Pd and SuperCollider, to name
just two [3; 4; 5].
In the architecture subdirectory within the
Faust distribution, there are presently seven
.lib les containing various utility functions.
Possibly the most commonly used of these is
music.lib, which also imports math.lib. Three
other .lib les pertain more specically to signal
processing utilities:
1
http://faust.grame.fr/
oscillator.lib signal sources
filter.lib general-purpose digital lters
effect.lib digital audio eects
The remaining two Faust library les are
maxmsp.liba Max/MSP compatibility library,
and reduce.libenabling function application
across a signal in time, such as maxn(n) =
reduce(max,n) to compute the maximum ampli-
tude of a signal.
The directory examples/faust-stk/ addition-
ally contains instrument.lib, providing com-
mon utility functions for the Faust-STK collec-
tion [6], such as envelope generators and table-
lookup utilities.
The libraries oscillator|filter|effect.lib
were rst discussed at LAC-08 [7]. This pa-
per provides an overview of developments since
then and up to Faust release version 0.9.46
(Dec. 2011).
2 Faust Library oscillator.lib
The purpose of oscillator.lib is to provide
reference implementations of various elementary
waveform generators, such as sinusoidal, saw-
tooth, and pulse-train, as well as other classic sig-
nals such as pink-noise, etc.
2.1 Sinusoid Generators
All sinusoidal oscillators in oscillator.lib are
invoked via the same API as osc(freq) (dened
in music.lib), where freq is the desired osc-
illation frequency in Hz. However, some provide
two outputs instead of one when both in-phase
and quadrature (sine and cosine) are available.
All are lter-based. That is, they are implemented
as lossless second-order lters driven by an im-
pulse signal [1,0,0,...], and they use no wave
tables.
2
All algorithms have been previously pub-
lished [8; 9; 10; 11].
3
Presently, the following algorithms are imple-
mented:
oscb biquad two-pole lter section
(impulse response)
oscr 2D vector rotation
(second-order normalized ladder)
provides sine and cosine outputs
oscrs sine output of oscr
oscrc cosine output of oscr
oscs state variable osc., cosine output
(modied coupled form resonator)
oscw digital waveguide oscillator
oscws sine output of oscw
oscwc cosine output of oscw
The relative merits of each oscillator type are
summarized below. Note that all dierences have
to do with nite numerical precision eects and
dynamic range variations under time-varying con-
ditions. The best overall choice depends on the
situation.
oscb, the impulsed direct-form biquad
4
is the
fastest computationally, requiring only one
multiplication and two additions per sample
of output. However, as is well known, the
amplitude of oscillation varies strongly with
frequency, and it becomes numerically poor
toward freq=0 (dc).
oscr, the 2D vector rotation, requires four
multiplies and two additions per sample. Its
amplitude is invariant with respect to fre-
quency, and it is good all the way down to dc.
Since its coecients are numerically inexact
roundings of s = sin(2*PI*freq/SR) and c
= cos(2*PI*freq/SR), where SR denotes the
sampling rate (dened in music.lib), there
is long-term amplitude drift corresponding to
the extent the identity s
2
+c
2
= 1 is violated.
This oscillator provides in-phase (cosine) and
phase-quadrature (sine) outputs.
2
osc(freq) in music.lib uses a length 2
16
wave table.
The linearly interpolated variant osci(freq) adds linear
interpolation.
3
https: //ccrma.stanford.edu/~jos/pasp/-
Digital Waveguide Oscillator.html
4
https://ccrma.stanford.edu/~jos/filters/-
Direct Form II.html
oscs, based on the classic state variable l-
ter, [12, p. 530] and known as the magic
circle algorithm in computer graphics, is
quite fast, requiring only two multiplies and
two additions per output sample. Its ampli-
tude varies much less with frequency, and it
too is good down to dc. There is no am-
plitude drift over time, so this one can be
used for very long signal durations. On the
other hand, there is some dependence of osc-
illation amplitude on frequency. At low fre-
quencies, its two state variables are nearly in
phase quadrature, but they become in-phase
at SR/2. Thus, two outputs with approxi-
mately 90-degrees relative phase at low fre-
quencies could be brought out. The output
that is brought out is the cosine choice.
oscw, the second-order digital waveguide os-
cillator, requires one multiply and three ad-
ditions when frequency is constant, and an-
other multiply when frequency is changing.
Otherwise it has all of the good properties of
oscr (except for internal dynamic range nor-
malization), providing sine and cosine out-
puts in exact phase quadrature, and no de-
pendence of amplitude on frequency. How-
ever, unlike oscr, oscw exhibits no amplitude
drift while frequency is xed. This is because
it uses a structurally lossless algorithm de-
rived by transformer coupling of normalized
digital waveguides [10; 8].
5
A negative point
relative to oscr is that numerical diculties
may arise below 10 Hz or so, implying that
oscw is not a good choice for LFOs. Inter-
nally, the state variables of oscw require a
larger dynamic range than those of oscr. It
is likely that oscw would be the most eco-
nomical choice for special-purpose VLSI.
2.2 Virtual Analog Waveforms
The following waveform generators are presently
included, among others:
imptrain(freq) periodic impulse train
squarewave(freq) zero-mean square wave
sawtooth(freq) alias-suppressed sawtooth
sawN(freq) order N anti-aliased saw
5
https: //ccrma.stanford.edu/~jos/pasp/-
Digital Waveguide Oscillator.html
The sawtooth and sawN algorithms are based
on recently developed Dierentiated Polynomial
Waveform (DPW) methods for virtual analog
waveform generation [13; 14]. The default case
is sawtooth = saw2, where saw2 is a dierenti-
ated parabolic waveform (order 2). More gen-
erally, sawN is based on a dierentiated polyno-
mial of order N. The higher the order, the less
aliasing is incurred. Bandlimited square, triangle,
and pulse-train are derived as linear lterings of
bandlimited sawtooth in Faust releases beyond
0.9.46.
2.3 Noise Generation
The basic white-noise generator, uniformly dis-
tributed between 1 and 1, is noise, dened
in music.lib. Based on that, oscillator.lib
also denes pink noise, also called 1/f noise
[15], implemented (approximately) as white noise
through a three-pole, three-zero IIR lter that ap-
proximates a 1/f power response.
6
The third-
order IIR lter was designed using invfreqz in
Octave (matlab).
3 Faust Library filter.lib
Filter-related utilities are provided in
filter.lib. The principal functions dened
appear in Fig. 1, p. 4, and Fig. 2, p. 5. To save
space, functions introduced at LAC-08 [7] are not
repeated here (such as EKS string synthesizer
elements, comb lters, cubic distortion overdrive,
dc blockers, speaker bandpass, Crybaby wah
pedal, etc.). The subsections below provide
further discussion of various groups. The source
is documented with comments and references so
that anyone knowledgeable in basic digital lter
theory [16] should be able to use it as a (terse)
manual and starting point for further reading.
3.1 Direct-Form Digital Filters
The four direct-form digital lter structures have
coecients that appear in the lter transfer
function.
7
The functions tf1(b0,b1,a1) and
tf2(b0,b1,b2,a1,a2) specify rst- and second-
order (biquad) digital lter sections, respectively.
Often larger lters are built by stringing rst-
6
https: //ccrma.stanford.edu/~jos/sasp/-
Example Pink Noise Analysis.html
7
https: //ccrma.stanford.edu/~jos/filters/-
filters/Four Direct Forms.html
and second-order sections in series and/or par-
allel. The Faust language makes this especially
easy to do.
The function iir(bcoeffs,acoeffs) allows
specication of an arbitrary-order IIR digital l-
ter in direct form. The arguments bcoeffs and
acoeffs are each parallel signal banks that pro-
vide the coecients, and they may be thought
of as lists of coecients. The pattern match-
ing facility in Faust allows recursive deni-
tion in terms of such lists. As an example,
tf2(b0,b1,b2,a1,a2) can be alternatively spec-
ied as iir((b0,b1,b2),(a1,a2)). As usual in
Faust, the specication is compact:
iir(bv,av) = sub ~ fir(av) : fir(bv);
where fir(bv) species a general causal FIR dig-
ital lter, with bv the list (vector) of FIR tap
coecients. It is given by
fir(bv,x)
= sum(i,count(bv),take(i+1,bv) * x@i);
where count and take are dened in math.lib.
3.2 Ladder and Lattice Digital Filters
Ladder and lattice digital lters have superior nu-
merical properties. Using the pattern-matching
facility, it was possible to specify all four ma-
jor types recursively in Faust. A particularly
valuable case is the normalized ladder lter [17]
iir nl(bcoeffs,acoeffs), used as the basis for
the super-robust biquad tf2snp(). While nor-
malized biquads are straightforward to design
(e.g., nlf2() in filter.lib), the normalized lad-
der lter realizes rational transfer functions of any
order (any number of poles and zeros) in terms of
a power-normalized ladder structure. For an in-
troduction and pointers to references, see [8] and
filter.lib.
8
3.3 Digital Filter Sections Specied as
Analog Filter Sections
It is convenient to be able to specify basic lter
section in terms of analog lter coecients, as op-
posed to the usual digital-lter coecients. This
is easy to do in Faust by including a built-in bilin-
ear transform.
9
This makes use of the wonderful
8
https: //ccrma.stanford.edu/~jos/pasp/-
Conventional Ladder Filters.html
9
https: //ccrma.stanford.edu/~jos/pasp/-
Bilinear Transformation.html
Direct-Form Digital Filters (3.1, p. 3)
fir(bcoeffs) general FIR digital lter
iir(bcoeffs,acoeffs) general IIR digital lter
tf1(b0,b1,a1) rst-order direct-form digital lter = iir((b0,b1),(a1))
tf2(b0,b1,b2,a1,a2) iir((b0,b1,b2),(a1,a2))
Lattice/Ladder Filters (3.2, p. 3)
iir lat2(bcoeffs,acoeffs) two-multiply lattice digital lter
iir kl(bcoeffs,acoeffs) Kelly-Lochbaum ladder digital lter
iir lat1(bcoeffs,acoeffs) one-multiply lattice digital lter
iir nl(bcoeffs,acoeffs) normalized ladder digital lter
tf2np(b0,b1,b2,a1,a2) biquad based on stabilized 2nd-order normalized ladder
nlf2(f,r) second-order normalized ladder digital lter, special API
Analog-Specied Filters (3.3, p. 3)
tf2s(b2,b1,b0,a1,a0,w1) tf2 specied via s-plane (analog) coecients
tf2snp(b2,b1,b0,a1,a0,w1) tf2s using a protected normalized ladder lter for tf2
tf2sb(b2,b1,b0,a1,a0,w1,wc) tf2s plus a mapping to bandpass in the digital domain
tf1sb(b1,b0,a0,w1,wc) same as tf2sb but for rst-order lter sections
IIR Low/High/Band-Pass (3.4, p. 6)
lowpass(N,fc) Nth-order Butterworth lowpass, 3 dB frequency at fc Hz
highpass(N,fc) Nth-order Butterworth highpass, 3 dB frequency at fc Hz
bandpass(Nh,fl,fu) Order 2*Nh Butterworth bandpass, 3 dB frequencies fl,fu Hz
bandstop(Nh,fl,fu) Order 2*Nh Butterworth bandstop lter, 3 dB gain at fl,fu Hz
lowpass3e(fc) 3rd-order elliptic lowpass, 60 dB stopband rejection, 0.2 dB passband rip.
lowpass6e(fc) 6th-order elliptic lowpass, 80 dB stopband rejection, 0.2 dB passband rip.
highpass6e(fc) highpass transformation of lowpass6e ( 1/)
bandpass12e(fl,fu) bandpass transformation of lowpass6e
bandpass6e(fl,fu) bandpass transformation of lowpass3e
Shelfs, Peaking Equalizers See Faust example parametric eq.dsp
low shelf1(L0,fx,x) 1st-order shelf, dc gain L0 dB, crossover to unity gain at fx Hz
low shelf1 l(G0,fx,x) dc gain G0 (linear), crossover to unity gain at fx Hz
low shelf3(L0,fx,x) 3rd-order low shelf
low shelf5(L0,fx,x) 5th-order low shelf
low shelf = low shelf3; // default = third-order case
high * same high-shelf cases as for low shelf
peak eq(Lfx,fx,B) 2nd-order peaking equalizer, peak level Lfx dB, width B Hz at fx Hz
peak eq cq(Lfx,fx,Q) Constant-Q 2nd-order peaking equalizer section, Q = fx/B
peak eq rm(Lfx,fx,w) Regalia-Mitra 2nd-order peaking equalizer section, w ~ PI*B/SR
Fractional Delay Lines (3.6, p. 6)
fdelayN(maxdelay, delay) Nth-order FIR Lagrange-interpolated delay line, N=1,2,3,4
fdelayNa(maxdelay, delay) Nth-order IIR allpass-interpolated delay line, N=1,2,3,4
Figure 1: Functions dened in filter.lib since LAC-08. See the source code for full usage documenta-
tion and literature references.
Filter Banks (3.7, p. 6)
mth octave analyzer(O,M,ftop,N) N-band octave lter-bank, M band-slices per octave,
Butterworth band-split order O (not 0, must be an odd integer),
N = total number of bands (including dc and Nyquist),
ftop = highest band-split crossover frequency (e.g., 20 kHz)
mth octave analyzer6e(M,ftop,N) uses order 6 elliptic band-split lters
mth octave filterbank(O,M,ftop,N) mth octave analyzer followed by delay equalizer
mth octave filterbank alt dc-inverted variant (cheaper for odd O)
mth octave spectral level spectrum analyzer using mth octave analyzer(5), displays
(in bar graphs) the average signal level in each spectral band
mth octave spectral level6e order 6 elliptic crossovers
spectral level = mth octave spectral level(2,10000,20); // simplest
half octave analyzer(N) = mth octave analyzer6e(2,10000,N);
half octave filterbank(N) = mth octave filterbank5(2,10000,N);
octave filterbank(N) = mth octave filterbank5(1,10000,N);
octave analyzer(N) = mth octave analyzer6e(1,10000,N);
analyzer(O,lfreqs) general analyzer, order O Butterworth crossovers at listed freqs
filterbank(O,lfreqs) analyzer(O,lfreqs) : delay equalizer (allpass-complementary)
filterbanki(O,lfreqs) Inverted-dc variant
Figure 2: Filter-bank functions dened in filter.lib. See the source code for full usage documentation
and literature references.
feature of Faust that if the coecients are con-
stant, all expressions will compile away to leave
numerical digital-lter coecients. On the other
hand, if a slider-control, say, is providing an ana-
log coecient, the bilinear transform will be com-
puted in real time (at the control rate) from the
controller by the compiled result. Normally a one-
pole smoother such as smooth(0.99) is used to
interface the nal computed coecient into the
ltering computation at the full sampling rate.
In particular, tf2s(b2a,b1a,b0a,a1a,a0a,w1)
equals tf2(b0d,b1d,b2d,a1d,a2d) specied in
the analog domain, where a last-letter a means
analog, and d means digital. (Note the oppo-
site numbering of the coecients, in conformance
with typical notation.) Thus, the analog transfer
function specied is
H(s) =
b
2,a
s
2
+ b
1,a
s + b
0,a
s
2
+ a
1,a
s + a
0,a
.
The parameter w1 is the digital frequency
d
to
which analog frequency
a
= 1 is mapped; it de-
termines the frequency-scaling parameter of the
bilinear transform. In lowpass or highpass lter
design, the frequency mapping is applied to the
cuto frequency (3 dB point).
Butterworth lters are particularly easy to
specify in analog form [18; 19; 16],
10
because,
for order N, all N zeros are at innity and all
N poles lie along a circle in the left-half s-plane.
For example, the second-order Butterworth low-
pass lter with its 3 dB frequency normalized
to
a
= 1 is simply
H(s) =
1
s
2
+

2 s + 1
and can be specied as tf2s(0,0,1,sqrt(2),1).
3.3.1 Normalization and Stability
Protection
For extreme time-varying ltering applications, a
practically useful variant named tf2snp is pro-
vided that implements tf2s using a normalized
ladder lter (for decoupling signal and coe-
cient energy, 3.2) together with stability pro-
jection (easy to do in ladder/lattice digital l-
ters by simply clipping their reection coecients
to the range (1, 1)). This is used in the most
numerically robust Moog VCF implementation
moog vcf 2bn (effect.lib, 4).
10
https: //ccrma.stanford.edu/~jos/filters/-
Butterworth Lowpass Design.html
The example vcf wah pedals.dsp in the
Faust distribution provides a comparison of three
Moog VCF implementations as well as the second-
order Crybaby wah-pedal and a fourth-order wah-
pedal based on the Moog VCF.
3.3.2 Bandpass Mapped Biquad
The function tf2sb(b2,b1,b0,a1,a0,w1,wc) is
a bandpass mapping of the basic analog-specied
biquad tf2s. In addition to the frequency-scaling
parameter w1 (which gets set to half the desired
passband width in radians per second), there is
a desired center-frequency parameter wc (also in
rad/s). Thus, tf2sb implements a fourth-order
digital bandpass lter section specied by the co-
ecients of a second-order analog lowpass proto-
type section. Such sections can be combined in
series for higher orders. The order of mappings is
(1) frequency scaling (to set lowpass cuto w1),
(2) bandpass mapping to wc, then (3) the bilinear
transform, with the usual scale parameter 2*SR,
where SR denotes the sampling rate. The Faust
implementation for this was based on algebra car-
ried out in maxima.
3.4 Butterworth Lo/Hi/Bandpass Filters
Butterworth lowpass and highpass lters of any
order can be dened recursively in Faust thanks
again to the pattern-matching facility in the lan-
guage. The elliptic (Cauer) lters
11
are special-
cased because the pole locations are computed
using the elliptic rational function, which is not
available in typical computer math libraries. Such
a function could of course be supplied as a foreign
function in Faust.
3.5 Shelf and Equalizer Sections
The low/high shelf and peaking equalizer sections
implemented in filter.lib are described further
in filter.lib and in [16].
12
3.6 Lagrange/Thiran-Interpolated
Fractional Delay Lines
Delay lines interpolated using higher-order FIR
Lagrange interpolation are all used as follows:
fdelayN(maxdelay, delay, inputsignal)
11
http://en.wikipedia.org/wiki/Elliptic filter
12
https: //ccrma.stanford.edu/~jos/filters/-
Low High Shelf Filters.html
where N=1,2,3, or 4 is the order of the Lagrange
interpolation polynomial. Note that this API fol-
lows that of fdelay in music.lib. The requested
delay should not be less than (N 1)/2 because
the interpolating polynomial needs to be able to
reach that far into the past when interpolat-
ing.
Delay lines interpolated using higher-order IIR
allpass Thiran interpolation are all invoked as
fdelayNa(maxdelay, delay, inputsignal)
where N=1,2,3, or 4 is the order of the allpass in-
terpolation lter. In this case, it is recommended
that the requested delay be at least N 1/2 be-
cause an Nth-order allpass provides a delay of N
samples as its coecients approach zero. Note
that delay arguments that are too small can pro-
duce an unstable allpass lter. For rapid delay
modulations, Lagrange (FIR) interpolation is gen-
erally preferred. However, allpass interpolation
introduces no gain distortion and may therefore
be preferred in nearly lossless feedback loops.
3.7 Filter Banks
A lter bank splits its input signal into a bank
of parallel signals, one for each spectral band.
If the bandpass lters used to create the chan-
nel signals are carefully designed, one may sum
the channel signals to get back the original input
signal (possibly scaled and/or delayed). In this
case, the lter bank is said to be a Perfect Re-
construction (PR) lter bank [20]. However, for
purposes of spectrum analysis, in which only the
channel signal powers are displayed, the PR con-
dition is overkill. Therefore, the lter banks im-
plemented in filter.lib are divided into an-
alyzers, which do not have the PR property,
and lter banks which are allpass complemen-
tary. Allpass-complementary lter banks are
reasonable choices for graphic equalizer appli-
cations. An allpass-complementary lter bank is
PR when the allpass reduces to a pure delay and
possible scaling. In this terminology, the lter
banks in filter.lib are implemented as analyz-
ers in cascade with delay equalizers that convert
the analyzer to an allpass-complementary lter
bank. Spectrum analyzer outputs should at least
be nearly power complementary, i.e., the power
spectra of the individual bands should at least ap-
proximately sum to the original power spectrum.
The typical lter bank or analyzer is con-
structed as a dyadic lter bank, meaning that
it consists of a sequence of band-splits, forming
a binary tree of lowpass/highpass lter sections.
Since audio applications are presumed, only the
lower band is split when going from one stage to
the next.
In the Faust distribution, both lter banks and
spectrum analyzers are illustrated in the example
graphic eq.dsp. See also spectral level.dsp
which is a standalone spectrum analyzer (nice as
a standalone JACK app).
The example gate compressor.dsp included
with the Faust distribution exercises the gate
and compression utilities.
Space limitations preclude further discussion
here. Please see comments in filter.lib for fur-
ther usage details.
4 Faust Library effect.lib
The modules in effect.lib classify as digital
audio eects. In general, they tend to be special-
purpose lters, frequently nonlinear and/or time
varying.
4.1 Moog Voltage Controlled Filters
New since the analog-form Moog VCF [7] is the
implementation moog vcf 2b of the ideal Moog
VCF transfer function factored into second-order
sections. As a result, its static frequency re-
sponse is more accurate than moog vcf which
suers from an unwanted one-sample delay in
its feedback path. On the downside, its coef-
cient formulas are more complex when one or
both parameters are varied. The res parameter
of moog vcf 2b[n] is the fourth root of that in
moog vcf, so, as the sampling rate approaches in-
nity, moog vcf(res,fr) becomes equivalent to
moog_vcf_2b[n](res^4,fr) (when res and fr
are constant).
4.2 Articial Reverberation
The reverberation modules in effect.lib are de-
scribed in [8]. Of special note is the high-quality
reverberator called zita rev1, ported to Faust
from the C++ source of zita-rev1 written by Fons
Adriaensen.
13
It combines Schroeder allpass and
FDN reverberation techniques [8].
14
13
http://kokkinizita.linuxaudio.org/linuxaudio/-
zita-rev1-doc/quickguide.html
14
https://ccrma.stanford.edu/~jos/pasp/Zita Rev1.html
5 Conclusion
Developments since LAC-08 for Faust libraries
oscillator|filter|effect.lib were outlined.
The overall goal is to accumulate reference imple-
mentations of commonly used algorithms in mu-
sic/audio signal processing, with a general prefer-
ence for expressive parametric algorithms yielding
the highest performed sound quality per unit of
computation.
6 Acknowledgments
Special thanks to Yann Orlarey for contributing
various improvements to the functions described
in this paper and making others possible at all,
particularly with respect to the use of pattern
matching. Special thanks also to Albert Graf for
adding the pattern-matching facility to the Faust
compiler.
References
[1] Y. Orlarey, D. Fober, and S. Letz,
Syntactical and semantical aspects of
Faust, Soft Computing, vol. 8, no. 9, pp.
623632, 2004.
[2] A. Gr af, Term rewriting extension for the
Faust programming language, in Proc. 8th
Int. Linux Audio Conf. (LAC2010), Utrecht,
http://lac.linuxaudio.org/, 2010,
http://lac.linuxaudio.org/2010/papers/-
30.pdf.
[3] Y. Orlarey, A. Graf, and S. Kersten, DSP
programming with Faust, Q and
SuperCollider, in Proc. 4th Int. Linux
Audio Conf. (LAC2006), ZKM Karlsruhe,
http://lac.zkm.de/2006/proceedings.shtml,
2006, pp. 3940,
http://lac.zkm.de/2006/proceedings.shtml-
#orlarey et al.
[4] A. Gr af, Interfacing Pure Data with
Faust, in Proc. 5th Int. Linux Audio
Conf. (LAC2007), TU Berlin,
http://www.kgw.tu-berlin.de/~lac2007/-
proceedings.shtml, 2007,
http://www.kgw.tu-berlin.de/~lac2007/-
papers/lac07 graef.pdf.
[5] J. O. Smith, Audio signal processing in
Faust, 2012,
https://ccrma.stanford.edu/~jos/aspf/.
Moog VCF See Faust example vcf wah pedals.dsp
moog vcf(res,fr) analog-form Moog VCF
res = corner-resonance amount between 0 (none) and 1 (max)
fr = corner-resonance frequency in Hz (less than SR/6.3 or so)
moog vcf 2b(res,fr) Moog VCF implemented as two biquads (tf2)
moog vcf 2bn(res,fr) two protected, normalized-ladder biquads (tf2np)
Phasing and Flanging See Faust example phaser flanger.dsp
vibrato2 mono(...) modulated allpass-chain (see effect.lib for usage)
phaser2 mono(...) phasing based on 2nd-order allpasses (see effect.lib for usage)
phaser2 stereo(...) stereo phaser based on 2nd-order allpass chains
flanger mono(...) mono anger
flanger stereo(...) stereo anger
Envelopes/Compression/Expansion See Faust example gate compressor.dsp
amp follower ud(att,rel) att = attack time-constant (sec) going up
amp follower(rel) rel = release time = time-constant (sec) going down (att=0)
autowah(level) level 0 to 1
gate mono(thresh,att,hold,rel) squelch signal when below thresh (in dB),
for at least hold seconds
gate gain mono(thresh,att,hold,rel,x) gain computer
gate stereo(thresh,att,hold,rel,x,y) two mono gates using same gain computer
compressor mono(ratio,thresh,att,rel) single-channel dynamic-range compression:
ratio = compression ratio dB-in over dB-out above thresh
thresh = dB level threshold above which compression kicks in
compressor stereo(...) stereo case, common gain computer
limiter 1176 R4 mono = compressor mono(4,-6,0.0008,0.5);
limiter 1176 R4 stereo stereo case
Articial Reverberation See Faust examples freeverb|reverb designer|zita rev1.dsp
jcrev, satrev Historical early Schroeder reverberators
fdnrev0(...) Feedback Delay Network (FDN) reverberator [8]
prime power delays(N,pathmin,pathmax) utility for nding prime-power delays across a range
zita rev fdn(f1,f2,t60dc,t60m,fsmax) order 8 FDN used in zita-rev1 - see effect.lib for usage
zita rev stereo(...) stereo version of zita-rev1 - see effect.lib for usage
zita rev1 ambi(...) zita-rev1 in ambisonics mode
mesh square(N) N by N square digital waveguide mesh
Other Modules
stereo width(w) stereo width eect based on the Blumlein Shuer
apnl(a1,a2,x) nonlinear allpass lter used in Faust-STK [6]
piano dispersion filter(M,B,f0) closed-form piano-string allpass by Rauhala et. al [21]
Figure 3: Functions dened in effect.lib since LAC-08.
[6] R. Michon and J. O. Smith, Faust-STK:
A set of linear and nonlinear physical
models for the Faust programming
language, in Proc. 14th Int. Conf. Digital
Audio Eects (DAFx-11), Paris, France,
September 1923, 2011.
[7] J. O. Smith, Virtual electric guitars and
eects using Faust and Octave, in Proc.
6th Int. Linux Audio Conf. (LAC2008),
http://lac.linuxaudio.org/, 2008.
[8] J. O. Smith, Physical Audio Signal
Processing, https://-
ccrma.stanford.edu/~jos/pasp/, Dec.
2010, online book.
[9] J. Dattorro, Eect design: Part 3:
Oscillators: Sinusoidal and pseudonoise, J.
Audio Eng. Soc., vol. 50, no. 3, pp. 115146,
2002.
[10] J. O. Smith and P. R. Cook, The
second-order digital waveguide oscillator,
in Proc. 1992 Int. Computer Music Conf.,
San Jose. 1992, pp. 150153, Computer
Music Association,
http://ccrma.stanford.edu/~jos/wgo/.
[11] J. W. Gordon and J. O. Smith, A sine
generation algorithm for VLSI
applications, in Proc. 1985 Int. Computer
Music Conf., Vancouver. 1985, Computer
Music Association.
[12] H. Chamberlin, Musical Applications of
Microprocessors, Hayden Book Co., Inc.,
New Jersey, 1980.
[13] V. V alimaki, Discrete-time synthesis of the
sawtooth waveform with reduced aliasing,
IEEE Signal Processing Letters, vol. 12, no.
3, pp. 214217, 2005.
[14] V. V alimaki, J. Nam, J. O. Smith, and J. S.
Abel, Alias-suppressed oscillators based on
dierentiated polynomial waveforms, IEEE
Trans. Audio, Speech, and Language
Processing, vol. 18, no. 5, May 2010.
[15] R. F. Voss and J. Clarke, 1/f noise in
music: Music from 1/f noise, J. Acoust.
Soc. of Amer., vol. 63, no. 1, pp. 258263,
Jan. 1978.
[16] J. O. Smith, Introduction to Digital Filters
with Audio Applications, http://-
ccrma.stanford.edu/~jos/filters/,
Sept. 2007, online book.
[17] A. H. Gray and J. D. Markel, A
normalized digital lter structure, IEEE
Trans. Acoustics, Speech, Signal Processing,
vol. ASSP-23, no. 3, pp. 268277, June 1975.
[18] C. S. Burrus, Digital Signal Processing and
Digital Filter Design (Draft), Connexions,
Sept. 2009, online book:
http://cnx.org/content/col10598/latest/.
[19] T. W. Parks and C. S. Burrus, Digital
Filter Design, John Wiley and Sons, Inc.,
New York, June 1987, contains FORTRAN
software listings.
[20] P. P. Vaidyanathan, Multirate Systems and
Filter Banks, Prentice-Hall, 1993.
[21] J. Rauhala and V. V alimaki, Tunable
dispersion lter design for piano synthesis,
IEEE Signal Processing Letters, vol. 13, no.
5, pp. 253256, May 2006.

You might also like