3
* Created on: 14/mar/2011
4
* Author: Vittorio Colao
5
* Original ideas taken from Audacity VampEffect class from Chris Cannam.
8
#ifndef VAMPANALYSER_H_
9
#define VAMPANALYSER_H_
14
#include <vamp-hostsdk/vamp-hostsdk.h>
16
#include "vamp/vamppluginloader.h"
17
#include "sampleutil.h"
18
#include "configobject.h"
22
VampAnalyser(ConfigObject<ConfigValue> *pconfig);
23
virtual ~VampAnalyser();
25
bool Init(const QString pluginlibrary, const QString pluginid,
26
const int samplerate, const int TotalSamples, bool bFastAnalysis);
27
bool Process(const CSAMPLE *pIn, const int iLen);
29
bool SetParameter(const QString parameter, const double value);
31
QVector<double> GetInitFramesVector();
32
QVector<double> GetEndFramesVector();
33
QVector<QString> GetLabelsVector();
34
QVector<double> GetFirstValuesVector();
35
QVector<double> GetLastValuesVector();
37
// Initialize the VAMP_PATH environment variable to point to the default
38
// places that Mixxx VAMP plugins are deployed on installation. If a
39
// VAMP_PATH environment variable is already set by the user, then this
40
// method appends to that.
41
static void initializePluginPaths();
44
void SelectOutput(const int outputnumber);
46
Vamp::HostExt::PluginLoader::PluginKey m_key;
47
int m_iSampleCount, m_iOUT, m_iRemainingSamples,
48
m_iBlockSize, m_iStepSize, m_rate, m_iOutput;
49
CSAMPLE ** m_pluginbuf;
50
Vamp::Plugin *m_plugin;
51
Vamp::Plugin::ParameterList mParameters;
52
Vamp::Plugin::FeatureList m_Results;
54
bool m_bDoNotAnalyseMoreSamples;
55
bool m_FastAnalysisEnabled;
56
int m_iMaxSamplesToAnalyse;
57
/** Pointer to config object */
58
ConfigObject<ConfigValue>* m_pConfig;
61
#endif /* VAMPANALYSER_H_ */