wavwrite

wavwrite — writes .wav sound file

Calling sequence

wavwrite(y,wavfile)  
wavwrite(y,Fs,wavfile)  
wavwrite(y,Fs,bits,wavfile)  

Parameters

y : real vector or matrix with entries in [-1,1].
wavfile : string (The .wav extension is appended if no extension is given)
Fs : integer, frequency sampling in Hz.
bits : integer, number of bits in the encoding.
method : string , 'mu' (default) or 'linear', encoding method.

Description

Utility function to save .wav sound file. wavwrite(y,wavfile) writes a sound file specified by the string wavfile. The data should be arranged with one channel per column. Amplitude values outside the range [-1,+1] are ignored. Supports multi-channel data for 8-bit mu-law, and 8- and 16-bit linear formats.

wavwrite(y,Fs,wavfile) specifies in Fs the sample rate of the data in Hertz.

wavwrite(y,Fs,bits,wavfile) selects the number of bits in the encoder. Allowable settings are bits=8 and bits=16.

See also

auread, wavread, savewave, analyze, mapsound