Applies to version: 1.1.0

View the code

Go to function

DBSPL - Calculates the SPL (in dB) of a signal


y = dbspl(insig);
y = dbspl(lvl);
y = dbspl(insig,'ac');


dbspl(insig) calculates the sound pressure level (SPL) in dB of insig considering the AMT default level convention, which is per default SPL of 93.98 dB for an RMS of 1.

dbspl(lin) outputs the SPL in dB for the linear level of lin.

dbspl(insig,'dboffset',dboffset) computes the SPL (in dB) of insig for a level convention different than the AMT default by considering an SPL offset given by dboffset such that \(dbspl = 20*log10(rms(insig)) + dboffset\). Some commonly used offsets are:

  • \(dboffset = 0\). With this offset, \(dbspl(insig) = 20*log10(rms(insig))\). This convention was used for the development of the lopezpoveda2001 and breebaart2001.
  • \(dboffset = -20*log10(20e-6) = 93.98\). This corresponds to the convention of the SPL reference of \(20 \mu Pa\). This addresses signals representing pressure in Pascal.
  • \(dboffset = 100\). This convention was used for the development of dau1996.

The AMT default level convention can be obtained by:

dboffset = dbspl(1);

In addition, 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.


B. C. J. Moore. An Introduction to the Psychology of Hearing. Academic Press, 5th edition, 2003.