Detects beats in audio (music) signals. More...
Import Statement: | import |
Inherits: |
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.
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.
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().
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:
1970/01/01
at the time the signal is emitted.1.0
.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.