comparison transform/FeatureExtractionModelTransformer.h @ 859:13803edd513d tonioni

Use a settings setting for flexi/non-flexi determination -- this may not be the right thing in the long run but it's simpler and easier than passing through a random value that doesn't actually come from anywhere
author Chris Cannam
date Wed, 04 Dec 2013 19:30:02 +0000
parents dba8a02b0413
children 47aa3aeb687b
comparison
equal deleted inserted replaced
858:6b77fcc39723 859:13803edd513d
29 class FeatureExtractionModelTransformer : public ModelTransformer 29 class FeatureExtractionModelTransformer : public ModelTransformer
30 { 30 {
31 Q_OBJECT 31 Q_OBJECT
32 32
33 public: 33 public:
34 enum PreferredOutputModel {
35 NoteOutputModel,
36 FlexiNoteOutputModel,
37 UndefinedOutputModel = 255
38 };
39
40 FeatureExtractionModelTransformer(Input input, 34 FeatureExtractionModelTransformer(Input input,
41 const Transform &transform, 35 const Transform &transform);
42 const PreferredOutputModel outputmodel);
43 36
44 // Obtain outputs for a set of transforms that all use the same 37 // Obtain outputs for a set of transforms that all use the same
45 // plugin and input (but with different outputs). i.e. run the 38 // plugin and input (but with different outputs). i.e. run the
46 // plugin once only and collect more than one output from it. 39 // plugin once only and collect more than one output from it.
47 FeatureExtractionModelTransformer(Input input, 40 FeatureExtractionModelTransformer(Input input,
48 const Transforms &relatedTransforms, 41 const Transforms &relatedTransforms);
49 const PreferredOutputModel outputmodel);
50 42
51 virtual ~FeatureExtractionModelTransformer(); 43 virtual ~FeatureExtractionModelTransformer();
52 44
53 protected: 45 protected:
54 bool initialise(); 46 bool initialise();
57 49
58 Vamp::Plugin *m_plugin; 50 Vamp::Plugin *m_plugin;
59 std::vector<Vamp::Plugin::OutputDescriptor *> m_descriptors; // per transform 51 std::vector<Vamp::Plugin::OutputDescriptor *> m_descriptors; // per transform
60 std::vector<int> m_fixedRateFeatureNos; // to assign times to FixedSampleRate features 52 std::vector<int> m_fixedRateFeatureNos; // to assign times to FixedSampleRate features
61 std::vector<int> m_outputNos; 53 std::vector<int> m_outputNos;
62 PreferredOutputModel m_preferredOutputModel;
63 54
64 void createOutputModel(int n); 55 void createOutputModel(int n);
65 56
66 void addFeature(int n, 57 void addFeature(int n,
67 size_t blockFrame, 58 size_t blockFrame,