Loudness (FPScript)
Calculates the loudness of a sound signal.
Syntax
Loudness(DataSet, [ Algorithm = LOUDNESS_ISO_532_1 ], [ SoundField = LOUDNESS_DIFFUSE ], [ InputType = LOUDNESS_INPUT_SPECTRUM ], [ SkipTime = 0.0 s ], [ CalibrationValue = 0.0 dB ] [ , Result = LOUDNESS_RESULT_LOUDNESS ])
or
Loudness(Signal, ReferenceSignal, CalibrationLevel, [ Algorithm = LOUDNESS_ISO_532_1 ], [ SoundField = LOUDNESS_DIFFUSE ], [ InputType = LOUDNESS_INPUT_SOUNDPRESSURE_STAT ], [ SkipTime = 0.0 s ] [ , Result = LOUDNESS_RESULT_LOUDNESS ])
The syntax of the Loudness function consists of the following parts:
Part |
Description |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DataSet |
The input data set with the spectra of the stationary sound, the measured voltages of the stationary sound, the measured voltages of the time-varying sound, the measured sound pressure levels of the stationary sound or the measured sound pressure levels of the time-varying sound. Permitted data structures are data series, data matrix, signal und signal series. All numeric data types are permitted. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
||||||||||||||||||
Signal |
The input data set with the measured voltages of the stationary sound, the measured voltages of the time-varying sound, the measured sound pressure levels of the stationary sound or the measured sound pressure levels of the time-varying sound. Permitted data structures are signal und signal series. All numeric data types are permitted. For the X component additional restrictions do apply. For complex data types the absolute value is formed. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
||||||||||||||||||
ReferenceSignal |
The reference signal with which the input signal is calibrated. Permitted data structures are signal. All numeric data types are permitted. For the X component additional restrictions do apply. For complex data types the absolute value is formed. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
||||||||||||||||||
CalibrationLevel |
The reference signal sound pressure level generated by the calibrator. Permitted data structures are scalar value. All numeric data types are permitted. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
||||||||||||||||||
Algorithm |
The algorithm for calculating loudness. The argument Algorithm can have the following values:
If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value LOUDNESS_ISO_532_1. |
||||||||||||||||||
SoundField |
Sound field. The Zwicker method supports the diffuse field and direct field (free field). The Stevens method only supports the diffuse field. The argument SoundField can have the following values:
If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value LOUDNESS_DIFFUSE. |
||||||||||||||||||
InputType |
The input signal type. Specifies how to interpret the DataSet input data set. A microphone sensitivity of 50 mV/Pa handles the conversion between voltage values (V) and sound pressure values (Pa). For more details, see Calibration in Acoustics. The argument InputType can have the following values:
If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value LOUDNESS_INPUT_SPECTRUM. |
||||||||||||||||||
SkipTime |
Time domain to skip at the start of the stationary input signal. This value is ignored in the case of time-varying signals. Permitted data structures are scalar value. All numeric data types are permitted. The argument is transformed to the unit s. The value must be greater or equal to 0 s. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value 0.0 s. |
||||||||||||||||||
CalibrationValue |
Calibration value used to factor in the microphone sensitivity in dB. A calibration value of 0 dB is equivalent to a microphone sensitivity of 50 mV/Pa or level output of dB over 1 µV for voltages. If the calibration value is omitted, 0 dB is used. The calibration value can be calculated from the AcousticCalibration function. Permitted data structures are scalar value. All numeric data types are permitted. The argument is transformed to the unit dB. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value 0.0 dB. |
||||||||||||||||||
Result |
Result type. Specifies which result the function returns. The argument Result can have the following values:
If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. If this argument is omitted, it will be set to the default value LOUDNESS_RESULT_LOUDNESS. |
Remarks
Loudness can be calculated for stationary and time-varying sound. With the Stevens method, an octave band analysis is performed, whereas with the Zwicker or Moore-Glasberg method, a third octave analysis is used. If the input spectrum does not match the required number of levels, it will be filled with zeros or will be cut off. For signals the level value is assigned to the associated frequency. Alternatively voltage signals or sound pressure signals can be selected as the input variable.
Available in
Option Acoustics
Supported Methods
Standard |
Method |
Sound field |
Dichotic listening |
Time-varying signals |
Result type |
---|---|---|---|---|---|
ISO 532-1 |
Zwicker |
Diffuse field/free field |
No |
Yes |
All |
ISO 532-2 |
Moore-Glasberg |
Diffuse field/free field |
Yes |
No |
Loudness/loudness level |
ISO 532 A |
Stevens (obsolete standard) |
Diffuse sound field |
No |
No |
Loudness/loudness level |
ISO 532 B |
Zwicker (obsolete standard) |
Diffuse field/free field |
No |
No |
Loudness/loudness level |
Observed Standards
Standard |
Description |
---|---|
ISO 532-1:2017 |
Acoustics - Method for calculating loudness. Part 1: Zwicker method |
ISO 532-2:2017 |
Acoustics - Method for calculating loudness. Part 2: Moore-Glasberg method |
ISO 532 (ISO 532 A, ISO 532 B) |
Acoustics - Method for calculating loudness level. |
DIN 45631 |
Procedure for calculating the loudness level and the loudness from the sound spectrum; E. Zwicker method. |
Examples
Loudness(Signal1, LOUDNESS_ISO_532_1, LOUDNESS_DIFFUSE, LOUDNESS_INPUT_SOUNDPRESSURE_STAT)
Determines loudness from the stationary sound level signal 'Signal1' according to the Zwicker method. The signal has already been calibrated.
Loudness(Signal1, Reference, 60, LOUDNESS_ISO_532_1, LOUDNESS_FREE, LOUDNESS_INPUT_SOUNDPRESSURE_STAT, 0.2, LOUDNESS_RESULT_LOUDNESSLEVEL)
Determines loudness (Zwicker method) from the stationary sound level signal 'Signal1'. The signal is calibrated via a reference signal corresponding to 60 dB. For the calculation 0.2 seconds are skipped at the start.