<< wavread Sound file handling Time and Date >>

Scilab Help >> Sound file handling > wavwrite

wavwrite

writes .wav sound file

Syntax

wavwrite(y, wavfile)
wavwrite(y, Fs, wavfile)
wavwrite(y, Fs, nbits, wavfile)

Arguments

y

row vector or matrix: Sound amplitudes = real values in [-1,1]. One row per channel. Values out of [-1,+1] are ignored.

wavfile

string (The .wav extension is appended if no extension is given)

Fs

integer: Sampling frequency, in Hz. 22500 is the default value.

nbits

bit-depth 8, 16, 24, 32 bits. it describes the number of bits of information recorded for each sample. 16 is the default value.

Description

Utility function to save .wav sound file. wavwrite(y,wavfile) writes a sound file specified by the string wavfile.

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

Examples

A = matrix(1:6,2,3);
wavwrite(A/6,TMPDIR+'/foo.wav');
B = wavread(TMPDIR+'/foo.wav');

See also


Report an issue
<< wavread Sound file handling Time and Date >>