summaryrefslogtreecommitdiff
path: root/rotord
diff options
context:
space:
mode:
Diffstat (limited to 'rotord')
-rw-r--r--rotord/src/nodes_audio_analysis.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/rotord/src/nodes_audio_analysis.h b/rotord/src/nodes_audio_analysis.h
index ee98c3b..8fb843c 100644
--- a/rotord/src/nodes_audio_analysis.h
+++ b/rotord/src/nodes_audio_analysis.h
@@ -50,8 +50,9 @@ namespace Rotor {
protected:
string soname,id;
int outputNo;
- private:
vampHost::Analyser analyser;
+ private:
+ //??
map <string,float> params;
};
class Audio_analysis: public Vamp_node {
@@ -95,9 +96,31 @@ namespace Rotor {
Act_segmenter* clone(map<string,string> &_settings) { return new Act_segmenter(_settings);};
void cleanup(){
Vamp_node::cleanup();
- cerr<<"act segmenter custom cleanup"<<endl;
+ //cerr<<"act segmenter custom cleanup"<<endl;
+ vector<float> durations;
+ for (map<double,vampHost::feature>::iterator f=analyser.features.begin();f!=analyser.features.end();++f){
+ auto g=f;
+ if (++g!=analyser.features.end()){
+ durations.push_back(g->first-f->first);
+ }
+ }
+
+
+ //distribute acts amongst segments;
+ if (analyser.features.size()==(int)parameters["acts"]->value+1){
+ for (auto f: analyser.features){
+ acts[f.first]=f.second.number;
+ }
+ }
+ else if (analyser.features.size()<(int)parameters["acts"]->value+1){
+ //find longest segment
+ }
+ else { //extra segments to distribute
+
+ }
}
private:
+ map<double,int> acts;
};
}