diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-10-30 14:15:47 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-10-30 14:15:47 +0000 |
| commit | b3abde4531510b7accbc58174ecd9ec27c52ee3a (patch) | |
| tree | 81f33784cea14312f0c2a99700e66d3804d78d46 /rotord/src/nodes_audio_analysis.h | |
| parent | 858cb95b8539f5695c5348c340b9f982d8b66719 (diff) | |
intensity segmenter
Diffstat (limited to 'rotord/src/nodes_audio_analysis.h')
| -rw-r--r-- | rotord/src/nodes_audio_analysis.h | 20 |
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 |
