#ifndef NoteCounter_hxx #define NoteCounter_hxx #include #include #include #include #include #include #include #include #include // Those two configuration types could be the ones you choose. // Your own ones or any type already in CLAM. #include "CLAM/Fundamental.hxx" #include class NoteCounter : public CLAM::Processing { CLAM::InPort mIn; typedef CLAM::NullProcessingConfig Config; public: const char* GetClassName() const { return "NoteCounter"; } NoteCounter(const Config & config=Config()) : mIn("CLAM::SpectralPeakArray", this) { Configure( config ); } ~NoteCounter() {} // Configuration to the minimal expression bool ConcreteConfigure(const CLAM::ProcessingConfig&) { return true; // I got proper configuration } const CLAM::ProcessingConfig& GetConfig() const { static Config config; return config; } bool Do() { bool result = Do(mIn.GetData()); // Tell the ports this is done mIn.Consume(); return result; } bool Do(const CLAM::SpectralPeakArray & in) { const CLAM::Array & magnitudes = mIn.GetData().GetMagBuffer(); return true; } bool ConcreteStop() { int i = 0; while (i