Code from my postgrad-honours DSP project