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.h42
1 files changed, 41 insertions, 1 deletions
diff --git a/rotord/src/nodes_audio_analysis.h b/rotord/src/nodes_audio_analysis.h
index 44ea3eb..db33b1f 100644
--- a/rotord/src/nodes_audio_analysis.h
+++ b/rotord/src/nodes_audio_analysis.h
@@ -78,9 +78,9 @@ namespace Rotor {
string soname,id;
int outputNo;
vampHost::Analyser analyser;
+ map <string,float> params;
private:
//??
- map <string,float> params;
};
class Audio_analysis: public Vamp_node {
//vamp node that allows the user to choose a plugin
@@ -266,6 +266,46 @@ namespace Rotor {
private:
};
+ class Intensity_segmenter: public Vamp_node {
+ //vamp node that applies a ruleset to manage a set of acts via a cycler
+ public:
+ Intensity_segmenter(){
+ title="Intensity segmenter";
+ description="Combines segmentation, tempo and intensity";
+ UID="74e05d10-3ffa-11e3-b5f9-7335309da36a";
+ analysers["segmenter"]=vampHost::Analyser();
+ analysers["tempo"]=vampHost::Analyser();
+ analysers["intensity"]=vampHost::Analyser();
+ };
+ Intensity_segmenter(map<string,string> &settings):Intensity_segmenter() {
+ base_settings(settings);
+ };
+ ~Intensity_segmenter(){};
+ Intensity_segmenter* clone(map<string,string> &_settings) { return new Intensity_segmenter(_settings);};
+ bool init(int _channels,int _bits,int _samples, int _rate) {
+ //params needed?
+ analysers["segmenter"].init("qm-vamp-plugins","qm-segmenter",_channels,_bits,_samples,_rate,0,params);
+ analysers["tempo"].init("qm-vamp-plugins","qm-tempotracker",_channels,_bits,_samples,_rate,2,params);
+ analysers["tempo"].init("bbc-vamp-plugins","bbc-intensity",_channels,_bits,_samples,_rate,0,params);
+ return true;
+ }
+ int process_frame(uint8_t *data,int samples_in_frame) {
+ for (auto a:analysers) a.second.process_frame(data,samples_in_frame);
+ return 1;
+ }
+ void cleanup() {
+ for (auto a:analysers) a.second.cleanup();
+
+ for (auto f:analysers["segmenter"].features){
+
+ }
+ //add last item back on
+ //acts[(*--analyser.features.end()).first]=analyser.features[(*--analyser.features.end()).first];
+ //analyser.features=acts;
+ }
+ private:
+ map<string,vampHost::Analyser> analysers;
+ };
}
#endif