diff options
Diffstat (limited to 'src/simpl/partial_tracking.h')
-rw-r--r-- | src/simpl/partial_tracking.h | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/src/simpl/partial_tracking.h b/src/simpl/partial_tracking.h index ade5584..e6f08d2 100644 --- a/src/simpl/partial_tracking.h +++ b/src/simpl/partial_tracking.h @@ -1,8 +1,12 @@ #ifndef PARTIAL_TRACKING_H -#define PARTIAL_TRACING_H +#define PARTIAL_TRACKING_H #include "base.h" +extern "C" { + #include "sms.h" +} + using namespace std; namespace simpl @@ -16,7 +20,7 @@ namespace simpl // --------------------------------------------------------------------------- class PartialTracking { - private: + protected: int _sampling_rate; int _max_partials; int _min_partial_length; @@ -30,19 +34,41 @@ class PartialTracking { void clear(); int sampling_rate(); - void sampling_rate(int new_sampling_rate); + virtual void sampling_rate(int new_sampling_rate); int max_partials(); - void max_partials(int new_max_partials); + virtual void max_partials(int new_max_partials); int min_partial_length(); - void min_partial_length(int new_min_partial_length); + virtual void min_partial_length(int new_min_partial_length); int max_gap(); - void max_gap(int new_max_gap); + virtual void max_gap(int new_max_gap); virtual Peaks update_partials(Frame* frame); virtual Frames find_partials(Frames frames); }; +// --------------------------------------------------------------------------- +// SMSPartialTracking +// --------------------------------------------------------------------------- +class SMSPartialTracking : public PartialTracking { + private: + SMSAnalysisParams _analysis_params; + SMSHeader _header; + SMSData _data; + int _num_peaks; + sample* _peak_amplitude; + sample* _peak_frequency; + sample* _peak_phase; + void init_peaks(); + + public: + SMSPartialTracking(); + ~SMSPartialTracking(); + void max_partials(int new_max_partials); + Peaks update_partials(Frame* frame); +}; + + } // end of namespace Simpl #endif |