Copyright © 2001-2018 MultiMedia Soft

How to detect beats positions and BPM

Previous pageReturn to chapter overviewNext page

Active DJ Studio supports both "Beats detection" (BD) analysis and "Beats Per Minute" (BPM) analysis.

 

"Beats detection" (BD) analysis can be performed in two ways:

 

Offline: in this case beats detection analysis is performed through a call to the BeatsDetectRequest method while the sound to analyze is not in playback status: beats detection is performed in a separate thread and the container application is informed about results being available through the BeatsAvailableOffline event. At this point you can enumerate available beats positions through the BeatsDetectGetBeatsCount method and to obtain each of them through the BeatsDetectGetBeatPos method. By default beats position analysis will scan the overall sound: a smaller range to analyze can be set through the BeatsDetectSetRange method.

 

Real-time: in this case beats detection is enabled by a call to the BeatsDetectEnableRT method and performed while the sound is in playback status: a BeatDetectedRealTime event is fired each time the control detects a beat during playback.

 

In both cases, parameters applied to beats detection analysis can be obtained/changed through the BeatsDetectGetParams and BeatsDetectSetParams methods.

 

 

"Beats Per Minute detection" (BPM) is enabled by default and automatically calculated each time a new sound is loaded: the BPMAvailable event will pass detected BPM to the container application.

 

Automatic BPM detection can been disabled/enabled through a call to the SetAutomaticBPM method: when disabled you can manually request BPM detection through the RequestSoundBPM method: also in this case the BPMAvailable event will pass detected BPM to the container application.

 

 

Both beats position detection and BPM detection won't work with sounds with more than 2 channels (5.1 or 7.1) or if the EnableMixingFeatures property has been set to BOOL_FALSE.

 

A sample of use of the "Beats detection" (BD) analysis in Visual Basic 6 and Visual C++ 6 can be found inside the following samples installed with the product's setup package:

- BeatsDetection

 

A sample of use of the "Beats Per Minute detection" (BPM) analysis in Visual Basic 6 and Visual C++ 6 can be found inside the following samples installed with the product's setup package:

- TestPlayers