summaryrefslogtreecommitdiff
path: root/rotord/src/nodes_audio_analysis.h
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/nodes_audio_analysis.h')
-rw-r--r--rotord/src/nodes_audio_analysis.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/rotord/src/nodes_audio_analysis.h b/rotord/src/nodes_audio_analysis.h
index 620f277..a3fe5b8 100644
--- a/rotord/src/nodes_audio_analysis.h
+++ b/rotord/src/nodes_audio_analysis.h
@@ -288,6 +288,8 @@ namespace Rotor {
analysers["segmenter"]=vampHost::Analyser();
analysers["tempo"]=vampHost::Analyser();
analysers["intensity"]=vampHost::Analyser();
+ create_parameter("intensity_weight","number","intensity weight","Intensity weighting",1.0f);
+ create_parameter("tempo_weight","number","tempo weight","Tempo weighting",1.0f);
};
Intensity_segmenter(map<string,string> &settings):Intensity_segmenter() {
base_settings(settings);
@@ -306,21 +308,7 @@ namespace Rotor {
analysers["intensity"].process_frame(data,samples_in_frame);
return 1;
}
- void cleanup(){
- //for (auto a:analysers) a.second.cleanup(); //WHY NOT WORK - its as if the call is const
- analysers["segmenter"].cleanup();
- analysers["tempo"].cleanup();
- analysers["intensity"].cleanup();
- cerr<<analysers["segmenter"].features.size()<<" segments"<<endl;
- cerr<<analysers["tempo"].features.size()<<" tempo features"<<endl;
- cerr<<analysers["intensity"].features.size()<<" intensity features"<<endl;
- //auto f=analysers["segmenter"].features.begin();
- //for (auto g=++analysers["segmenter"].features.begin();g!=analysers["segmenter"].features.end();f++,g++){
- // cerr<<"calculating segment from "<<f.first<<" to "<<g.first<<endl;
- // features[f.first]=f.second;
- //}
- return true;
- }
+ void cleanup(); //all the fun happens here
void print_summary(){
cerr<<"Intensity segmenter found "<<features.size()<<" features "<<endl;
};
@@ -329,4 +317,6 @@ namespace Rotor {
};
}
+
+
#endif