No BSD License  

Highlights from
SafeSnd - A safer version of sound()

Be the first to rate this file! 1 Download (last 30 days) File Size: 1.08 KB File ID: #20612

SafeSnd - A safer version of sound()

by Earl Vickers

 

08 Jul 2008 (Updated 09 Jul 2008)

This scales back the sound playback level, in case your audio algorithm blows up.

| Watch this File

File Information
Description

This is a simple function to prevent massive clipping and possible hearing damage in case the audio algorithm you were working on happens to be unstable or has too much gain.

This is not a limiter; it just scales back the entire signal if necessary to ensure that the maximum peak value is no more than +/-1.0. If the peak input level exceeded 1.0, safesnd() displays the amount of playback level reduction in dB. There's nothing magic here; it's just a handy utility function.

Also, note that it is generally not a good idea to debug your audio algorithms using headphones!

Required Products Signal Processing Toolbox
MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
audio processing Earl Vickers 22 Oct 2008 10:09:24
video processing Earl Vickers 22 Oct 2008 10:09:24
sound Earl Vickers 22 Oct 2008 10:09:24
audio Earl Vickers 22 Oct 2008 10:09:24
hearing Earl Vickers 22 Oct 2008 10:09:24
damage Earl Vickers 22 Oct 2008 10:09:24
protection Earl Vickers 22 Oct 2008 10:09:24
loss Earl Vickers 22 Oct 2008 10:09:24
ears Earl Vickers 22 Oct 2008 10:09:24
loud Earl Vickers 22 Oct 2008 10:09:24
loudness Earl Vickers 22 Oct 2008 10:09:24

Contact us at files@mathworks.com