blob: 84251ff4a85449e619c01bf213278a4f6fdbc256 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/* Beat Tracking test via vamp-plugins
* analyzerbeats.h
*
* Created on: 16/mar/2011
* Author: Vittorio Colao
*/
#ifndef ANALYZER_ANALYZERBEATS_H
#define ANALYZER_ANALYZERBEATS_H
#include <QHash>
#include "analyzer/analyzer.h"
#include "analyzer/vamp/vampanalyzer.h"
#include "preferences/usersettings.h"
class AnalyzerBeats: public Analyzer {
public:
AnalyzerBeats(UserSettingsPointer pConfig);
virtual ~AnalyzerBeats();
bool initialize(TrackPointer tio, int sampleRate, int totalSamples) override;
bool loadStored(TrackPointer tio) const override;
void process(const CSAMPLE *pIn, const int iLen) override;
void cleanup(TrackPointer tio) override;
void finalize(TrackPointer tio) override;
private:
static QHash<QString, QString> getExtraVersionInfo(
QString pluginId, bool bPreferencesFastAnalysis);
QVector<double> correctedBeats(QVector<double> rawbeats);
UserSettingsPointer m_pConfig;
VampAnalyzer* m_pVamp;
QString m_pluginId;
bool m_bPreferencesReanalyzeOldBpm;
bool m_bPreferencesFixedTempo;
bool m_bPreferencesOffsetCorrection;
bool m_bPreferencesFastAnalysis;
int m_iSampleRate, m_iTotalSamples;
int m_iMinBpm, m_iMaxBpm;
};
#endif /* ANALYZER_ANALYZERBEATS_H */
|