Function Reference: Volume 3 (P-Z) - The MathWorks - #751

/ 1696


catalogue search
P. 751
P. 752
P. 753
P. 754
P. 755
P. 756
P. 757
P. 758
P. 759
P. 760
P. 761
P. 762
P. 763
P. 764
P. 765
P. 766
P. 767
P. 768
P. 769
P. 770
P. 771
P. 772
P. 773
P. 774
P. 775
P. 776
P. 777
P. 778
P. 779
P. 780
P. 781
P. 782
P. 783
P. 784
P. 785
P. 786
P. 787
P. 788
P. 789
P. 790
P. 791
P. 792
P. 793
P. 794
P. 795
P. 796
P. 797
P. 798
P. 799
P. 800


See other catalogues for The MathWorks

Text version of the page
sound
Purpose 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) to the speaker on PC 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 thoseincolumn2totheright.
Note The playback duration that results from setting Fs depends on the sound card you have installed. Most sound cards support sample frequencies of approximately 5-10 kHz to 44.1 kHz. Sample frequencies outside this range can produce unexpected results.
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 supports all Windows-compatible sound devices. Additional
sound acquisition and generation capability is available in the Data Acquisition Toolbox. 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
2-3035

pageCatalog pdf di En 2012-06-22-01