-
Notifications
You must be signed in to change notification settings - Fork 0
/
MyPlugin.h
100 lines (77 loc) · 2.43 KB
/
MyPlugin.h
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// This is a skeleton file for use in creating your own plugin
// libraries. Replace MyPlugin and myPlugin throughout with the name
// of your first plugin class, and fill in the gaps as appropriate.
// Remember to use a different guard symbol in each header!
#ifndef MY_PLUGIN_H
#define MY_PLUGIN_H
#include "vamp-sdk/Plugin.h"
#include </usr/local/include/armadillo>
#include <Vector>
#include "getODFValue.h"
#include "IBI.h"//si può rimuovere
#include "peakPicking.h"//si può rimuovere
#include "Multipath/src/PathFinderMP.h"
#include "Multipath/src/SimpleTracker.h"
#include "Multipath/src/TrackersManager.h"
#include "Multipath/src/PtsList.h"
#include "Multipath/src/PathFinder.h"
#include "Multipath/src/BeatPtsList.h"
#include "Multipath/src/kth_order_statistic.h"
#include "BeatPeriod.hpp"
using std::string;
using namespace arma;
using std::vector;
class MyPlugin : public Vamp::Plugin
{
public:
MyPlugin(float inputSampleRate);
virtual ~MyPlugin();
string getIdentifier() const;
string getName() const;
string getDescription() const;
string getMaker() const;
int getPluginVersion() const;
string getCopyright() const;
InputDomain getInputDomain() const;
size_t getPreferredBlockSize() const;
size_t getPreferredStepSize() const;
size_t getMinChannelCount() const;
size_t getMaxChannelCount() const;
ParameterList getParameterDescriptors() const;
float getParameter(string identifier) const;
void setParameter(string identifier, float value);
ProgramList getPrograms() const;
string getCurrentProgram() const;
void selectProgram(string name);
OutputList getOutputDescriptors() const;
bool initialise(size_t channels, size_t stepSize, size_t blockSize);
void reset();
FeatureSet process(const float *const *inputBuffers,
Vamp::RealTime timestamp);
FeatureSet getRemainingFeatures();
size_t durationInputFile;
protected:
// plugin-specific data and methods go here
size_t m_blockSize;
size_t m_stepSize;
float m_sampleRate;
//Input parameters
float m_ntrackers = 18;
float m_stability = 40;
//Useful variables for the plugin to store information
cx_rowvec frame;
cx_rowvec frame_1;
cx_rowvec frame_2;
rowvec real;
rowvec img;
rowvec peaks;
rowvec ibi;
rowvec envelopeArray;
vector<double> storeODF;
// FeatureSet fs;
int j = 0;
int n;
vector<Vamp::RealTime> timestamps;
Vamp::RealTime origin;
};
#endif