SMSAnalysisConfig.hxx

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2004 MUSIC TECHNOLOGY GROUP (MTG)
00003  *                         UNIVERSITAT POMPEU FABRA
00004  *
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 #ifndef _SMSAnalysisConfig_
00023 #define _SMSAnalysisConfig_
00024 
00025 #include "DataTypes.hxx"
00026 #include "ProcessingConfig.hxx"
00027 #include "SpectralAnalysisConfig.hxx"
00028 #include "SpectralPeakDetectConfig.hxx"
00029 #include "FundFreqDetectConfig.hxx"
00030 #include "SinTrackingConfig.hxx"
00031 #include "SynthSineSpectrumConfig.hxx"
00032 
00033 namespace CLAM {
00034 
00035 class EWindowType;
00036 
00037 class SMSAnalysisConfig:public ProcessingConfig
00038 {
00039 
00040         friend class SMSAnalysis;
00041 
00042         DYNAMIC_TYPE_USING_INTERFACE (SMSAnalysisConfig,8,ProcessingConfig);
00044         DYN_ATTRIBUTE(0,public,SpectralAnalysisConfig, SinSpectralAnalysis);
00045         DYN_ATTRIBUTE(1,public,SpectralAnalysisConfig, ResSpectralAnalysis);
00046 
00047         DYN_ATTRIBUTE(2,public,SpectralPeakDetectConfig, PeakDetect);
00048         DYN_ATTRIBUTE(3,public,FundFreqDetectConfig, FundFreqDetect);
00049         DYN_ATTRIBUTE(4,public,SinTrackingConfig, SinTracking);
00052         DYN_ATTRIBUTE(5,protected,int, prSamplingRate);
00053         DYN_ATTRIBUTE(6,protected,int, prFFTSize);
00054         DYN_ATTRIBUTE(7,public, SynthSineSpectrumConfig,SynthSineSpectrum);
00055 
00056         
00057 //Config shortcuts
00058 public:
00060         void SetSinWindowSize(TSize w);
00061         TSize GetSinWindowSize() const;
00063         void SetSinWindowType(const EWindowType& t);
00064         const EWindowType& GetSinWindowType() const;
00066         void SetSinZeroPadding(int z);
00067         int GetSinZeroPadding() const;
00069         void SetResWindowSize(TSize w);
00070         TSize GetResWindowSize() const;
00072         void SetResWindowType(const EWindowType& t);
00073         const EWindowType& GetResWindowType() const;
00075         void SetResZeroPadding(int z);
00076         int GetResZeroPadding() const;
00078         void SetHopSize(TSize h);
00079         TSize GetHopSize() const;
00080 
00082         void SetSamplingRate(TData sr);
00083         TData GetSamplingRate() const;
00084 
00086         TSize GetInitialOffset() const;
00087 
00088         TSize GetHopsInBiggerWindow() const;
00089 
00090 private:
00091 
00092         
00093         void DefaultInit();
00094         void DefaultValues();
00095 
00097         TInt32 PowerOfTwo(TInt32 size);
00098 };
00099 
00100 }
00101 
00102 #endif
00103 
Generated by  doxygen 1.6.3