Scilab Read processing WAV files (2) __ Math software

Source: Internet
Author: User

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);



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.