2 - Basic audio processing
Published online by Cambridge University Press: 28 January 2010
Summary
Audio is normal and best handled by Matlab, when stored as a vector of samples, with each individual value being a double-precision floating point number. A sampled sound can be completely specified by the sequence of these numbers plus one other item of information: the sample rate. In general, the majority of digital audio systems differ from this in only one major respect, and that is they tend to store the sequence of samples as fixed-point numbers instead. This can be a complicating factor for those other systems, but an advantage to Matlab users who have two less considerations to be concerned with when processing audio: namely overflow and underflow.
Any operation that Matlab can perform on a vector can, in theory, be performed on stored audio. The audio vector can be loaded and saved in the same way as any other Matlab variable, processed, added, plotted, and so on. However there are of course some special considerations when dealing with audio that need to be discussed within this chapter, as a foundation for the processing and analysis discussed in the later chapters.
This chapter begins with an overview of audio input and output in Matlab, including recording and playback, before considering scaling issues, basic processing methods, then aspects of continuous analysis and processing. A section on visualisation covers the main time- and frequency-domain plotting techniques. Finally, methods of generating sounds and noise are given.
Handling audio in Matlab
Given a high enough sample rate, the double precision vector has sufficient resolution for almost any type of processing that may need to be performed – meaning that one can usually safely ignore quantisation issues when in the Matlab environment.
- Type
- Chapter
- Information
- Applied Speech and Audio ProcessingWith Matlab Examples, pp. 7 - 37Publisher: Cambridge University PressPrint publication year: 2009