Name
Stat -- enumerate audio peak & RMS levels, approx. freq., etc.
Synopsis
stat [-s scale] [-rms] [-freq] [-v] [-d]
Function
Display time and frequency domain statistical information about the audio. Audio is passed unmodified through the processing chain.

The information is output to the standard output stream and is calculated, where n is the duration of the audio in samples, c is the number of audio channels, r is the audio sample rate, and xk represents the PCM value (in the range -1 to +1 by default) of each successive sample in the audio, as follows:

‘Samples read’
nxc

‘Length (seconds)’
n/r

‘Scaled by’
See -s below.

‘Maximum amplitude’
max(xk). The maximum sample value in the audio; usually this will be a positive number.

‘Minimum amplitude’
min(xk). The minimum sample value in the audio; usually this will be a negative number.

‘Midline amplitude’
1/2min(xk)+1/2max(xk).

‘Mean norm’
1/nS(|xk|). The average of the absolute value of each sample in the audio.

‘Mean amplitude’
1/nS(xk). The average of each sample in the audio. If this figure is non-zero, then it indicates the presence of a D.C. offset (which could be removed using the dcshift effect).

‘RMS amplitude’
sqrt(1/nS(xk^2) The level of a D.C. signal that would have the same power as the audio's average power.

‘Maximum delta’
max(|xk-xk-1|)

‘Minimum delta’
min(|xk-xk-1|)

‘Mean delta’
1/n-1S(|xk-xk-1|)

‘RMS delta’
sqrt(1/n-1S((xk-xk-1)^2))

‘Rough frequency’
In Hz.

‘Volume Adjustment’
The parameter to the vol effect which would make the audio as loud as possible without clipping. Note: See the discussion on clipping above for reasons why it is rarely a good idea actually to do this.

Note that the delta measurements are not applicable for multichannel audio.

The -s option can be used to scale the input data by a given factor. The default value of scale is 2147483647 (i.e. the maximum value of a 32-bit signed integer). Internal effects always work with signed long PCM data and so the value should relate to this fact.

The -rms option will convert all output average values to "root mean square" format.

The -v option displays only the "Volume Adjustment" value.

The -freq option calculates the input's power spectrum (4096 point DFT) instead of the statistics listed above. This should only be used with a single channel audio sample.

The -d option displays a hex dump of the 32-bit signed PCM data audio in the sound processor's internal buffer. This is mainly used to help track down endian problems that sometimes occur in cross-platform versions of the sound processor.

See also the stats effect.


Show TOC