BeatLib


BeatDetector QML Type

Detects beats in audio (music) signals. More...

Import Statement: import
Inherits:

AudioEffect

Properties

Signals

Methods

Detailed Description

This AudioEffect detects beats in the MP3Decoder's audio signal. It analyzes the signal's volume and detects whenever it rises significantly.

It emits the signal beatDetected() for each detected beat.

Property Documentation

beatHalfLifeTimeMs : real

Set this to a time in milliseconds to use as a time to fade out a detected beat's intensity. This volume is used in combination with envelopeDetector as a minimum intensity for the next detected beat.


envelopeDetector : AudioEffect

Set this to an AudioEffect instance to apply to detect the audio signal's envelope. The envelope is then analyzed and whenever it rises significantly, beatDetected() is emitted.


minTimeDistanceMs : real

Set this to a time in milliseconds to use as a minimum time distance between detected beats.


preEffect : AudioEffect

Set this to an AudioEffect instance to apply to the audio signal before starting beat detection.


volumeDetector : VolumeDetector

You can set this to a VolumeDetector instance to apply to detect the audio signal's volume. This way you can have information about the detected beat's volume in beatDetected().


Signal Documentation

beatDetected(int currentTime, int sampleIndex, real envValue, real diffValue, real maxValue, real volume)

Emitted when a beat is detected. This happens ahead of time, when the beat is calculated from the current audio buffer.

The parameters contain information about the beat:


Method Documentation

void resetState()

Reset the beat detection algorithm's state. Call this to treat the rest of the MP3Decoder's audio signal like a completely new audio signal.