Teaching

Resources relating to my teaching are collected here. See also the Resources page for some related tools and demos.

Musical Applications of Fourier Theory and DSP (course link)

Lecture 1: Signals, Sinusoids, and Complex Exponentials

Building a sound out of sinusoids

Shows that by adding together just the right amplitude and phase of a set of sinusoids, a complex audio signal can be synthesised.

Any mono audio signal is exactly the sum of sinusoids at its DFT frequencies. Add them in from the lowest frequency upward, and listen to the sound assemble itself.

Quantisation and bit depth in digital audio Explore the effect of level quantisation, controlled via bit-depth, on the sound of digital audio files.
Taylor series reconstruction Interactive demo showing Taylor series reconstruction of a few common functions.
Cosine and sine functions as projections from a rotating phasor Interactive animation illustrating the generation of cosine and sine functions from a rotating phasor.
Beating and psychoacoustic roughness What happens if we add together a pair of periodic signals where the frequencies are similar, but not quite the same? If the signals are simple sinusoids, we get interesting “beating” effects. If the signals are each rich in harmonics, such as sawtooth waves, human listeners experience quite particular psychoacoustic effects – sometimes called “roughness”.
Damped sinusoids and complex frequency Interactive demo showing the generation of a damped sinusoid via the idea of complex frequency.

Lecture 2: Continuous-time Spectral Representations

Two phasors make a single real sinusoid Interactive demo showing how a pair of oppositely rotating phasors (one of positive frequency, one of negative frequency) combine to make a single real sinusoid.
The spectrum as a recipe Interactive demo showing how a combination of just a handful of sinusoids can produce a time waveform that is complicated, and potentially even not periodic.
Using Fourier series to build audio waveforms Interactive demo showing an audio waveform is created by combining 1 or more harmonic frequency components.

Lecture 3: Discrete-time and Basic Filters

Sampling a complex phasor Interactive demo showing how sampling a complex phasor at discrete time intervals creates a discrete-time signal. Concepts such as aliasing and bandwidth are included.
The wagon wheel and aliasing Interactive demo showing the classic demonstration of aliasing and folding.
Digital synthesis of square and sawtooth waveforms Synthesising a square wave, or sawtooth wave, will give very different results, depending on how the wave is put together. A partial Fourier series sum, via the frequency domain, is a much better way that naively making a “square” waveform in the time domain.

Lecture 4: LTI Systems in Discrete Time

Numerical measurement of FIR frequency response Impulse responses of various basic feedforward (FIR) filters are applied to different inputs, and the resulting output plotted point-by-point. Taking the magnitude of the result provides a numerical estimate of the frequency response at the given frequency.
Discrete convolution step-by-step The output of an LTI filter y[n] can be obtained by convolving an input x[n] with the filter’s impulse response h[n]. This discrete convolution operation can be understood as “flipping” h and running it over x, computing the sum of point-wise products of the overlapping samples at each time step.

Lecture 5: The Discrete Fourier Transform

Building a sequence from its DFT (the inverse DFT) We use the bin entries of the forward DFT to compute the time-domain sequence via the inverse DFT.

Lecture 6: Properties of the Discrete Fourier Transform

Linear vs. circular time delays For an N-length signal, time delay has a very different effect depending on whether the delayed samples move outside the window (linear delay) or are wrapped back around (circular delay).
The DFT samples the DTFT (on-bin vs. off-bin signals, and DFT leakage) The DFT can be understood as a sampling of a signals DTFT. Depending on whether the signal includes only components that are periodic over the analysis window (on-bin), or components that are not periodic (off-bin), leakage is either invisible, or very obvious, in the DFT we see.
Circular vs linear convolution Consider signals x[n] and h[n], of length N_x and N_h samples, respectively. Circular and linear convolution are different ways of convolving these signals together. Circular convolution is associated with multiplying N-length DFTs, meaning that either x or h, whichever is shorter, is padded to the length of the other – let’s call this length N samples. Multiplying their spectra causes output samples “beyond” N to wrap around into the start of the analysis window. This is known as time-domain aliasing, since the output must be N samples long.

In contrast, linear convolution is implemented in the time domain to produce a signal of length N_x + N_h -1.

Circular convolution can lead to the same result as linear convolution if the two time-domain signals are first padded to a length N_x + N_h -1 samples, before being transformed via the DFT into their frequency domain representations. Indeed, this is exactly how so-called ‘fast’ or ‘frequency domain’ convolution is achieved.

Leakage and windowing functions Different windowing functions have different spectral properties, and these affect how easy it is to discriminate between a pair of sinusoids of different frequency.