diff options
Diffstat (limited to 'src/simpl/partial_tracking.h')
-rw-r--r-- | src/simpl/partial_tracking.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/simpl/partial_tracking.h b/src/simpl/partial_tracking.h new file mode 100644 index 0000000..ade5584 --- /dev/null +++ b/src/simpl/partial_tracking.h @@ -0,0 +1,48 @@ +#ifndef PARTIAL_TRACKING_H +#define PARTIAL_TRACING_H + +#include "base.h" + +using namespace std; + +namespace simpl +{ + + +// --------------------------------------------------------------------------- +// PartialTracking +// +// Link spectral peaks from consecutive frames to form partials +// --------------------------------------------------------------------------- + +class PartialTracking { + private: + int _sampling_rate; + int _max_partials; + int _min_partial_length; + int _max_gap; + Frames _frames; + + public: + PartialTracking(); + ~PartialTracking(); + + void clear(); + + int sampling_rate(); + void sampling_rate(int new_sampling_rate); + int max_partials(); + void max_partials(int new_max_partials); + int min_partial_length(); + void min_partial_length(int new_min_partial_length); + int max_gap(); + void max_gap(int new_max_gap); + + virtual Peaks update_partials(Frame* frame); + virtual Frames find_partials(Frames frames); +}; + + +} // end of namespace Simpl + +#endif |