Mercurial > hg > qm-vamp-plugins
comparison plugins/SegmenterPlugin.cpp @ 37:9ce0db4770a2
* work on integrating segmenter (not yet done)
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 09 Jan 2008 16:51:59 +0000 |
parents | 5359ba489c0f |
children | 9a2edd83775f |
comparison
equal
deleted
inserted
replaced
36:5359ba489c0f | 37:9ce0db4770a2 |
---|---|
9 | 9 |
10 #include <iostream> | 10 #include <iostream> |
11 #include <sstream> | 11 #include <sstream> |
12 | 12 |
13 #include "SegmenterPlugin.h" | 13 #include "SegmenterPlugin.h" |
14 #include "ClusterMeltSegmenter.h" | 14 #include "dsp/segmentation/ClusterMeltSegmenter.h" |
15 | 15 |
16 using std::string; | 16 using std::string; |
17 using std::vector; | 17 using std::vector; |
18 using std::cerr; | 18 using std::cerr; |
19 using std::endl; | 19 using std::endl; |
44 } | 44 } |
45 | 45 |
46 string | 46 string |
47 SegmenterPlugin::getCopyright() const | 47 SegmenterPlugin::getCopyright() const |
48 { | 48 { |
49 return "All rights reserved"; | 49 return "Copyright (c) 2006-2008 - All Rights Reserved"; |
50 } | 50 } |
51 | 51 |
52 bool | 52 bool |
53 SegmenterPlugin::initialise(size_t channels, size_t stepSize, size_t blockSize) | 53 SegmenterPlugin::initialise(size_t channels, size_t stepSize, size_t blockSize) |
54 { | 54 { |
161 ClusterMeltSegmenterParams params = ClusterMeltSegmenterParams(); | 161 ClusterMeltSegmenterParams params = ClusterMeltSegmenterParams(); |
162 params.featureType = (feature_types) featureType; | 162 params.featureType = (feature_types) featureType; |
163 if (params.featureType == FEATURE_TYPE_CONSTQ) | 163 if (params.featureType == FEATURE_TYPE_CONSTQ) |
164 { | 164 { |
165 params.ncomponents = 20; | 165 params.ncomponents = 20; |
166 params.neighbourhoodLimit = 30; | 166 params.neighbourhoodLimit = 30; |
167 } | 167 } |
168 if (params.featureType == FEATURE_TYPE_CHROMA) | 168 if (params.featureType == FEATURE_TYPE_CHROMA) |
169 { | 169 { |
170 params.hopSize = 0.1; | 170 params.hopSize = 0.1; |
171 params.windowSize = 0.372; | 171 params.windowSize = 0.372; |