1.4 Conclusion

In this first chapter we introduced definitions and classifications of audio effects, to provide an overview of the territory to be explored. Then, some basic concepts of digital signals, their spectra and digital systems have been introduced. The description is intended for persons with little or no knowledge of digital signal processing. The inclusion of MATLAB M-files for all stages of processing may serve as a basis for further programming in the following chapters. As well as showing simple tools for graphical representations of digital audio signals we have calculated the spectrum of a signal x(n) by the use of the FFT M-file

  • Xmagnitude=abs(fft(x))

    Xphase=angle(fft(x)).

Time-domain processing for DAFX can be performed by block-based input–output computations which are based on the convolution formula (if the impulse response of a system is known) or difference equations (if the coefficients a and b are known). The computations can be done by the following M-files:

  • y=conv(h,x) %length of output signal l_y = l_h +l_x -1

    y=filter(b,a,x) %l_y = l_x

These M-files deliver an output vector containing the output signal y(n) in a vector of corresponding length. Of course, these block processing algorithms perform their inner computations on a sample-by-sample basis. Therefore, we have also shown an example for the sample-by-sample programming technique, which can be modified according to different applications:

  • y=dafxalgorithm(parameters,x)

    % Sample-by sample algorithm y(n)=function(parameters,x(n)) ...

Get DAFX: Digital Audio Effects, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.