BeatLib


VolumeDetector QML Type

Detects an audio signal's volume. More...

Import Statement: import
Inherits:

DirectForm2Filter

Properties

Detailed Description

Detects the volume of an MP3Decoder's audio signal. It does so by using a PeakFinder on the absolute value on the filtered signal.

This is a subclass of DirectForm2Filter, but the filtering is performed on the signal's absolute value. For volume detection it is advisible to set the DirectForm2Filter::data property to a smoothing, e.g. low-pass filter.

The current volume can be read from volume.

Property Documentation

filterDelayMs : int

Set this to an estimate of the DirectForm2Filter's delay time, in milliseconds. The volume will then be calculated and set that much time in advance.


updateIntervalMs : int

Set this to a time in milliseconds the filter uses as an update interval.


[read-only] volume : real

The current detected volume, a real value between 0 and 1. Realistically usually below 0.5, but this depends on the signal and the DirectForm2Filter::data setting.