MATLAB Function Reference Previous page   Next Page
wavread

Read Microsoft WAVE (.wav) sound file

Graphical Interface

As an alternative to auread, use the Import Wizard. To activate the Import Wizard, select Import Data from the File menu.

Syntax

Description

wavread supports multichannel data, with up to 32 bits per sample, and supports reading 24- and 32-bit .wav files.

y = wavread('filename') loads a WAVE file specified by the string filename, returning the sampled data in y. The .wav extension is appended if no extension is given. Amplitude values are in the range [-1,+1].

[y,Fs,bits] = wavread('filename') returns the sample rate (Fs) in Hertz and the number of bits per sample (bits) used to encode the data in the file.

[...] = wavread('filename',N) returns only the first N samples from each channel in the file.

[...] = wavread('filename',[N1 N2]) returns only samples N1 through N2 from each channel in the file.

siz = wavread('filename','size') returns the size of the audio data contained in the file in place of the actual audio data, returning the vector siz = [samples channels].

See Also

auread, wavwrite


Previous page  wavplay wavrecord Next page

© 1994-2005 The MathWorks, Inc.