L = fopen(file-name,mode=’string’,xdr=boolean,swap=boolean)
|
The mode string can also include the letter b as a last character. Adding the b is used if you do I/O to a binary file (but note that The b is ignored on all POSIX conforming systems, including Linux).
Description
The SndFile data type is used for file I/O operations.
rate=22050;n=3;t=linspace(0,n,n*rate); x1=sin(2*%pi*220*t); x2=sin(2*%pi*440*t); x3=sin(2*%pi*660*t); x=x1+0.5*x2+0.25*x3; F=sndfile('test.wav',mode='w',samplerate=22050,channels=1); F.write[x]; F.close[]; F=sndfile('test.wav',mode='r'); F.format F.frames