Reading and Writing WAV files |
READWAV(file) Returns the audio data contained in a WAV file. When a matrix is returned, successive columns represent separate channels of data.
WRITEWAV(file, s, b) Writes the data contained in an array to a Microsoft WAV file using the sample rate s and bit resolution b.

file must be a pulse code modulated (PCM) Microsoft WAV file.
If b is between 1 and 8, the data is written to the file as unsigned byte data. The limits on unsigned byte data are 0-256.
If b is between 9 and 16, word data (two bytes) is written to the file. The limits on word data are -32768 - +32767.