TracktionEngine
Public Member Functions | Static Public Member Functions | List of all members
tracktion::engine::TempoDetect Class Reference

Uses the SoundTouch BPMDetect class to guess the tempo of some audio. More...

Public Member Functions

 TempoDetect (int numChannels_, double sampleRate)
 
float processReader (juce::AudioFormatReader &reader)
 Processes an entire AudioFormatReader returning the tempo for it. More...
 
float processAndDetect (const float **const inputSamples, int numSamples)
 Processes a block of audio returning the tempo for it. More...
 
float getBpm () const
 Returns the last BPM detected. More...
 
bool isBpmSensible () const
 
void processSection (juce::AudioBuffer< float > &buffer, int numSamplesToProcess)
 Processes a non-interleaved buffer section. More...
 
float finishAndDetect ()
 Completes the detection process and returns the BPM. More...
 
void processSection (const float *const *inputSamples, int numSamples)
 

Static Public Member Functions

static juce::Range< float > getSensibleRange ()
 

Detailed Description

Uses the SoundTouch BPMDetect class to guess the tempo of some audio.

Constructor & Destructor Documentation

◆ TempoDetect()

tracktion::engine::TempoDetect::TempoDetect ( int  numChannels_,
double  sampleRate 
)

Member Function Documentation

◆ processReader()

float tracktion::engine::TempoDetect::processReader ( juce::AudioFormatReader &  reader)

Processes an entire AudioFormatReader returning the tempo for it.

Returns
the tempo in BPM for the block.

References finishAndDetect(), and processSection().

◆ processAndDetect()

float tracktion::engine::TempoDetect::processAndDetect ( const float **const  inputSamples,
int  numSamples 
)

Processes a block of audio returning the tempo for it.

Returns
the tempo in BPM for the block.

References processSection().

◆ getBpm()

float tracktion::engine::TempoDetect::getBpm ( ) const

Returns the last BPM detected.

◆ isBpmSensible()

bool tracktion::engine::TempoDetect::isBpmSensible ( ) const

References getSensibleRange().

◆ getSensibleRange()

static juce::Range<float> tracktion::engine::TempoDetect::getSensibleRange ( )
static

Referenced by isBpmSensible().

◆ processSection() [1/2]

void tracktion::engine::TempoDetect::processSection ( juce::AudioBuffer< float > &  buffer,
int  numSamplesToProcess 
)

Processes a non-interleaved buffer section.


Referenced by processAndDetect(), and processReader().

◆ finishAndDetect()

float tracktion::engine::TempoDetect::finishAndDetect ( )

Completes the detection process and returns the BPM.

Referenced by processReader().

◆ processSection() [2/2]

void tracktion::engine::TempoDetect::processSection ( const float *const *  inputSamples,
int  numSamples 
)

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