soundsc
Scale data and play as sound
Description
soundsc(
scales the values of
audio signal y
)y
to fit in the range from –1 to 1, and then
sends the data to the speaker at the default sample rate of 8192 Hz. 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
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.
Tips
The
soundsc
function supports sound devices on all Windows® and most UNIX® platforms.soundsc
in MATLAB Online and MATLAB Web App Server is supported in Google Chrome®.Note
Security Considerations When Using MATLAB Online or MATLAB Web App Server: When using
soundsc
in MATLAB Online or MATLAB Web App Server, certain features and settings help you keep control of your privacy.To reduce the likelihood of unwanted applications using your microphone, turn off automatic access to your audio device. You can change these settings at any time. After granting permission to a website once, your browser may be able to access your microphone automatically for that site on future visits. Use the browser settings for Google Chrome to revoke access for specific sites after you have initially allowed access.
You can also access the MATLAB Online website or MATLAB Web App Server using the private browsing mode in Google Chrome. When you do this, Chrome® automatically asks you for permission every time it tries to access your microphone, regardless of your browser settings.
Extended Capabilities
Version History
Introduced before R2006a
See Also
audioplayer
| sound
| audioread
| audiowrite