Digital Sound & Music: Concepts, Applications, & Science, Chapter 5, last updated 6/25/2013
38
Figure 5.32 Prompt for metadata to be stored in header of uncompressed WAV file
The WAV file can be read an array in MATLAB with the following:
xWav = wavread('HornsE04Mono.wav');
The wavread function strips the header off and places the raw audio values into the array x.
These values have a maximum range from 1 to 1. If you want to know the sampling rate sr and
bit depth b, you can use this:
[xWav, sr, b] = wavread('HornsE04Mono.wav');
If the file is stereo, you'll get a two-dimensional array with the same number of samples in each
channel.
To save a permanent copy of audio data in an uncompressed WAV format, you use
wavwrite in MATLAB
Adobe Audition allows you to save an audio file as raw data with no header by
deselecting the "Save extra non-audio information" box (Figure 5.33).
Previous Page Next Page