Audacity 3.2.0
Classes | Namespaces | Typedefs | Functions | Variables
GetMeterUsingTatumQuantizationFit.cpp File Reference
#include "GetMeterUsingTatumQuantizationFit.h"
#include "IteratorX.h"
#include "MapToPositiveHalfIndex.h"
#include "MirDsp.h"
#include "MirTypes.h"
#include "MirUtils.h"
#include "MusicInformationRetrieval.h"
#include <array>
#include <cassert>
#include <cmath>
#include <map>
#include <numeric>
#include <regex>
#include <unordered_map>
#include <unordered_set>
Include dependency graph for GetMeterUsingTatumQuantizationFit.cpp:

Go to the source code of this file.

Classes

struct  MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::BarDivision
 

Namespaces

namespace  MIR
 
namespace  MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}
 

Typedefs

using MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::PossibleDivHierarchies = std::unordered_map< int, std::vector< BarDivision > >
 

Functions

PossibleDivHierarchies MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::GetPossibleDivHierarchies (double audioFileDuration)
 
int MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::GetOnsetLag (const std::vector< float > &odf, int numTatums)
 
double MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::GetQuantizationDistance (const std::vector< int > &peakIndices, const std::vector< float > &peakValues, size_t size, int numDivisions, int lag)
 
OnsetQuantization MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::RunQuantizationExperiment (const std::vector< float > &odf, const std::vector< int > &peakIndices, const std::vector< float > &peakValues, const std::vector< int > &possibleNumTatums, QuantizationFitDebugOutput *debugOutput)
 
std::optional< TimeSignature > MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::GetTimeSignature (const BarDivision &barDivision, int numTatums)
 
double MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::GetTimeSignatureLikelihood (const std::optional< TimeSignature > &ts, double bpm)
 
double MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::GetBeatSelfSimilarityScore (double odfAutoCorrSampleRate, double bpm, const std::vector< float > &odfAutoCorr, int odfAutocorrFullSize, QuantizationFitDebugOutput *debugOutput)
 
size_t MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::GetBestBarDivisionIndex (const std::vector< BarDivision > &possibleBarDivisions, double audioFileDuration, int numTatums, const std::vector< float > &odf, QuantizationFitDebugOutput *debugOutput)
 
MusicalMeter MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::GetMostLikelyMeterFromQuantizationExperiment (const std::vector< float > &odf, int numTatums, std::vector< BarDivision > possibleBarDivisions, double audioFileDuration, QuantizationFitDebugOutput *debugOutput)
 
bool MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::IsSingleEvent (const std::vector< int > &peakIndices, const std::vector< float > &peakValues)
 
std::optional< MusicalMeter > MIR::GetMeterUsingTatumQuantizationFit (const MirAudioReader &audio, FalsePositiveTolerance tolerance, const std::function< void(double)> &progressCallback, QuantizationFitDebugOutput *debugOutput)
 Get the BPM of the given audio file, using the Tatum Quantization Fit method. More...
 

Variables

constexpr auto MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::minTatumsPerMinute = 100
 
constexpr auto MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::maxTatumsPerMinute = 700
 
constexpr auto MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::minBpm = 50.
 
constexpr auto MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::maxBpm = 200.
 
constexpr auto MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::minBeatsPerBar = 2
 
constexpr auto MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::maxBeatsPerBar = 4
 
constexpr std::array< std::pair< int, int >, 9 > MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::possibleTatumsPerBeat