Scale data and play as sound
soundsc(y,Fs)
soundsc(y)
soundsc(y,Fs,bits)
soundsc(y,...,slim)
soundsc(y,Fs) sends the signal in vector y (with sample frequency Fs) to the speaker on PC and most UNIX platforms. The signal y is scaled to the range before it is played, resulting in a sound that is played as loud as possible without clipping.
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. |
soundsc(y) plays the sound at the default sample rate or 8192 Hz.
soundsc(y,Fs,bits) plays the sound using bits number of bits/sample if possible. Most platforms support bits = 8 or bits = 16.
soundsc(y,...,slim), where slim = [slow shigh], maps the values in y between slow and shigh to the full sound range. The default value is slim = [min(y) max(y)].
MATLAB supports all Windows-compatible sound devices.
© 1984-2008 The MathWorks, Inc.