Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

sound - Convert vector into sound

Syntax

sound(y,Fs)
sound(y)
sound(y,Fs,bits)

Description

sound(y,Fs) sends the signal in vector y (with sample frequency Fs, in hertz) to the speaker on Microsoft Windows and most UNIX platforms. Values in y are assumed to be in the range –1.0 ≤ y ≤ 1.0. Values outside that range are clipped. Stereo sound is played on platforms that support it when y is an n-by-2 matrix. The values in column 1 are assigned to the left channel, and those in column 2 to the right.

sound(y) plays the sound at the default sample rate or 8192 Hz.

sound(y,Fs,bits) plays the sound using bits number of bits/sample, if possible. Most platforms support bits = 8 or bits = 16.

Remarks

MATLAB software supports all sound devices compatible with Windows operating systems. Additional sound acquisition and generation capability is available in Data Acquisition Toolbox software. The toolbox functionality includes the ability to buffer the acquisition so that you can analyze the data as it is being acquired. See the examples on MATLAB sound acquisition and sound generation.

See Also

auread, auwrite, soundsc, audioplayer, wavread, wavwrite

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS