Marsyas  0.6.0-alpha
/usr/src/RPM/BUILD/marsyas-0.6.0/src/marsyas/marsystems/TempoHypotheses.h
Go to the documentation of this file.
00001 /*
00002 ** Copyright (C) 1998-2006 George Tzanetakis <gtzan@cs.uvic.ca>
00003 **
00004 ** This program is free software; you can redistribute it and/or modify
00005 ** it under the terms of the GNU General Public License as published by
00006 ** the Free Software Foundation; either version 2 of the License, or
00007 ** (at your option) any later version.
00008 **
00009 ** This program is distributed in the hope that it will be useful,
00010 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 ** GNU General Public License for more details.
00013 **
00014 ** You should have received a copy of the GNU General Public License
00015 ** along with this program; if not, write to the Free Software
00016 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017 */
00018 
00019 #ifndef MARSYAS_TEMPOHYPOTHESES_H
00020 #define MARSYAS_TEMPOHYPOTHESES_H
00021 
00022 #include <marsyas/system/MarSystem.h>
00023 
00024 namespace Marsyas
00025 {
00060 class TempoHypotheses: public MarSystem
00061 {
00062 private:
00063   //Add specific controls needed by this MarSystem.
00064   void addControls();
00065   MarControlPtr ctrl_nPhases_;
00066   MarControlPtr ctrl_nPeriods_;
00067   MarControlPtr ctrl_inductionTime_;
00068   MarControlPtr ctrl_srcFs_;
00069   MarControlPtr ctrl_hopSize_;
00070   MarControlPtr ctrl_tickCount_;
00071   MarControlPtr ctrl_dumbInduction_;
00072   MarControlPtr ctrl_dumbInductionRequest_;
00073   MarControlPtr ctrl_triggerInduction_;
00074   MarControlPtr ctrl_accSize_;
00075   MarControlPtr ctrl_maxPeriod_;
00076   MarControlPtr ctrl_minPeriod_;
00077 
00078   mrs_natural maxPeriod_;
00079   mrs_natural minPeriod_;
00080   mrs_natural accSize_;
00081   mrs_bool triggerInduction_;
00082   mrs_bool dumbInductionRequest_;
00083   mrs_natural hopSize_;
00084   mrs_real srcFs_;
00085   mrs_natural inductionSize_;
00086   mrs_natural timeElapsed_;
00087   mrs_natural nPhases_;
00088   mrs_natural nPeriods_;
00089   mrs_bool foundPeriods_;
00090   mrs_bool foundPhases_;
00091   mrs_natural manualBPMs_[10];
00092   void myUpdate(MarControlPtr sender);
00093 
00094 public:
00095   TempoHypotheses(std::string name);
00096   TempoHypotheses(const TempoHypotheses& a);
00097   ~TempoHypotheses();
00098   MarSystem* clone() const;
00099 
00100   void myProcess(realvec& in, realvec& out);
00101 };
00102 
00103 }//namespace Marsyas
00104 
00105 #endif