y = dbspl(insig); y = dbspl(insig,'ac');
dbspl(insig) computes the average SPL (sound pressure level) of the input signal measured in dB, using the convention that a pure tone at 100 dB SPL has an RMS value of 1.
dbspl(insig,'dboffset',dboffset) specifies a reference level to convert between RMS and dB SPL. Default value is 100. Some commonly used values are:
Globally changing the reference level for all functions in the toolbox can be done by the following code:
ltfatsetdefaults('dbspl','dboffset',desired_dboffset);
and the currently used reference level is obtained by:
current_dboffset = dbspl(1);
DBSPL takes the following flags at the end of the line of input parameters:
'ac' | Consider only the AC component of the signal (i.e. the mean is removed). |
'dim',d | Work along specified dimension. The default value of [] means to work along the first non-singleton one. |
'dboffset',dboffset | Specify offset in dB. Default value is 100. |
B. C. J. Moore. An Introduction to the Psychology of Hearing. Academic Press, 5th edition, 2003.