Contents Previous Next Subchapters

Reading and Plotting WAV Audio Files
Syntax readwav(file)
Syntax readwav(fileplotprint)
See Also bread

Description
Reads .WAV format audio files and returns a double precision column vector. The character row vector file specifies the file to read. If present, the arguments plot and print must be logical scalars. If the argument plot equals true the readwav function will plot the contents of the input file. If the argument print equals true, the readwav function will print information about the contents of the file.

Example
If you enter
     D = readwav([OM_INSTALL, "\example\chimes.wav"], true, true)
O-Matrix will plot the contents of the chimes.wav audio file from the distribution and echo the following results to the screen
file length is  15912  bytes 
format tag, 1 = PCM  1 
number of channels 1=mono 2=stereo  1 
sample rate (samples/sec)  22050 
bytes per sec  22050 
block align  1 
bits per sample  8 
length of data block in bytes is  15876