Logo Search packages:      
Sourcecode: ardour version File versions  Download package

BPMDetect Class Reference

#include <BPMDetect.h>

List of all members.


Detailed Description

Class for calculating BPM rate for audio data.

Definition at line 71 of file BPMDetect.h.


Public Member Functions

 BPMDetect (int numChannels, int sampleRate)
 Constructor.
float getBpm ()
void inputSamples (soundtouch::SAMPLETYPE *samples, int numSamples)
virtual ~BPMDetect ()
 Destructor.

Protected Member Functions

void calcEnvelope (soundtouch::SAMPLETYPE *samples, int numsamples)
int decimate (soundtouch::SAMPLETYPE *dest, const soundtouch::SAMPLETYPE *src, int numsamples)
void init (int numChannels, int sampleRate)
 Initialize the class for processing.
void updateXCorr (int process_samples)

Protected Attributes

soundtouch::FIFOSampleBufferbuffer
 FIFO-buffer for decimated processing samples.
int channels
 Number of channels (1 = mono, 2 = stereo).
int decimateBy
 Decimate sound by this coefficient to reach approx. 500 Hz.
int decimateCount
 Sample average counter.
soundtouch::LONG_SAMPLETYPE decimateSum
 Sample average accumulator for FIFO-like decimation.
float envelopeAccu
 Amplitude envelope sliding average approximation level accumulator.
float RMSVolumeAccu
 RMS volume sliding average approximation level accumulator.
int sampleRate
 sample rate
int windowLen
 Auto-correlation window length.
int windowStart
float * xcorr
 Auto-correlation accumulator bins.

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index