From 6a9e9a8f44ca5b9996acd239ddb16ee4f00f00d5 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 21 Nov 2013 16:10:21 +0000 Subject: intensity segmenter level redistribution --- rotord/src/nodes_audio_analysis.cpp | 22 +++++++++++++++++++++- rotord/src/nodes_audio_analysis.h | 1 + rotord/src/rotor.h | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) (limited to 'rotord/src') diff --git a/rotord/src/nodes_audio_analysis.cpp b/rotord/src/nodes_audio_analysis.cpp index 6ec1188..ad6f5ad 100644 --- a/rotord/src/nodes_audio_analysis.cpp +++ b/rotord/src/nodes_audio_analysis.cpp @@ -178,9 +178,29 @@ namespace Rotor{ } //sort and convert to features std::sort(totals.begin(),totals.end(),sortsegments); + vector bucketoffsets; + for (auto t:totals) bucketoffsets.push_back(0.0f); + if (parameters["levels"]->value>0.0f&¶meters["levels"]->valuevalue); + int numberperbin=ceil((float)numbertoredistribute/totals.size()); + int added=0; + for (int j=0;j0) { + cerr<<"reducing number of levels by "< &settings):Intensity_segmenter() { base_settings(settings); diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index 624e0f0..e882c05 100644 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -584,7 +584,7 @@ namespace Rotor { return nullptr; } //cut mode - //for (uint32_t i=0;iget((Time_spec)frame)))%image_inputs.size(); //+i Image *in=image_inputs[whichinput]->get(inframe); if (in) return in; -- cgit v1.2.3