DSP Blockset
  Go to block:
    Search    Help Desk 
From Wave File    See Also

Read audio data from a Microsoft Wave (.wav) file (Windows 95/98/NT only).

Library

DSP Sources

Description

The From Wave File block reads audio data from a Microsoft Wave (.wav) file and outputs a double-precision signal with amplitudes in the range ±1. The audio data must be in the uncompressed PCM (pulse code modulation) format.

The File name parameter can specify an absolute or relative path to the file. If the file is on the MATLAB path or in the current directory (the directory returned by typing pwd), you need only specify the file's name. You do not need to specify the .wav extension in either case.

The output from the block, y, is a length-M frame of audio data from a mono signal, or an M-by-2 matrix containing one frame of audio data from each channel of a stereo signal. The frame size, M, is specified by the Samples per frame parameter. The output frame period, Tfo, is

where Fs is the data sample rate in Hz.

The block icon shows the name, sample rate (in Hz), number of channels (1 or 2), and sample width (in bits) of the data in the specified audio file. All sample rates are supported; the sample width must be either 8 or 16 bits.

Dialog Box

File name
The path and name of the file to read. Paths can be relative or absolute.
Samples per frame
The number of samples in each output frame.

See Also

From Wave Device
Signal From Workspace
To Wave File
wavread (MATLAB)


[ Previous | Help Desk | Next ]