Wavread and Wavwrite Two functions have been introduced in the previous blog. Here are some other useful functions.
playsnd function
Play sound data. The basic usage is as follows. Where command is only used in Unix class systems. The program used to specify the sound to play. Win under no consideration.
[]=playsnd (Y)
[]=playsnd (y,rate,bits [, command])
If rate is not specified, the default is 22050
Bits are not actually used in the current version, so there is no need to set them.
I usually collect sounds with a high sampling rate and then set a low rate here to slowly release the sound. The details can be heard very clearly.
Sound function
The functions of the Sound function are exactly the same as the PLAYSND function. I don't know why Scilab have to keep both functions.
Sound (y [, Fs,bits,command)
auread function
Read. Au file, the usage basic and Wavread are the same. The following method is used to illustrate that each parameter has the same meaning as the corresponding parameter in Wavread. So there's not much to explain here.
Y=auread (Aufile)
Y=auread (Aufile,ext)
[Y,fs,bits]=auread (Aufile)
[Y,fs,bits]=auread (Aufile,ext)
auwrite function
Writes the data to a. au file.
Auwrite (Y,aufile)
Auwrite (Y,fs,aufile)
Auwrite (Y,fs,bits,aufile)
Auwrite (y,fs,bits,method,aufile)
Analyze function
Draws a spectrum of sound data.
Analyze (Y, fmin, Fmax, FS, points);
Here's an example
[Y,fs,bits]=wavread ("c63a 4331440.wav");
Plot (y);
Analyze (y, MB, 15000, FS, size (y,2));
z = ABS (FFT (y));
Plot (z (1:16,342)/41532);