soundsc
Scale data and play as sound
Description
soundsc(
scales
the values of audio signal y
)y
to fit in the range
from –1.0 to 1.0, and then sends the data to the speaker at
the default sample rate of 8192 hertz. By first scaling the data, soundsc
plays
the audio as loudly as possible without clipping. The mean of the
dynamic range of the data is set to zero.
Examples
Input Arguments
Limitations
When using
soundsc
in MATLAB Online™ or MATLAB Web App Server™,soundsc
ignoresnBits
. Instead, it plays audio data using the default number of bits per sample of the output audio device.
More About
Tips
The
sound
function supports sound devices on all Windows® and most UNIX® platforms.Most sound cards support sample rates between 5 and 48 kilohertz. Specifying a sample rate outside this range might produce unexpected results.
Audio playback in MATLAB Online and MATLAB Web App Server are supported in Google Chrome™.
Version History
See Also
audioplayer
| sound
| audioread
| audiowrite