SpectralAnalysisConfig.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 _SpectralAnalysis_
00023 #define _SpectralAnalysis_
00024 
00025 #include "DataTypes.hxx"
00026 #include "ProcessingConfig.hxx"
00027 #include "WindowGeneratorConfig.hxx"
00028 #include "CircularShiftConfig.hxx"
00029 #include "FFTConfig.hxx"
00030 
00031 namespace CLAM {
00032 
00042 class SpectralAnalysisConfig:public ProcessingConfig
00043 {
00044         friend class SpectralAnalysis;
00045 
00046         DYNAMIC_TYPE_USING_INTERFACE (SpectralAnalysisConfig,9,ProcessingConfig);
00048         DYN_ATTRIBUTE(0,public,WindowGeneratorConfig, WindowGenerator);
00049         DYN_ATTRIBUTE(1,public,CircularShiftConfig,CircularShift);
00050         DYN_ATTRIBUTE(2,public,FFTConfig, FFT);
00051         DYN_ATTRIBUTE(3,public,int, prHopSize);
00052         DYN_ATTRIBUTE(4,public,int, prZeroPadding);
00053         DYN_ATTRIBUTE(5,public,int, prSamplingRate);
00054         DYN_ATTRIBUTE(6,public,int, prFFTSize);
00055   //xamat: added these so they can be accessible from a configurator
00056         DYN_ATTRIBUTE(7,public,int, prWindowSize);
00057         DYN_ATTRIBUTE(8,public,EWindowType, prWindowType);
00058 
00059 public:
00060 //Config shortcuts
00061 
00071         void SetWindowSize(TSize w);
00072 
00074         TSize GetWindowSize() const;
00075 
00080         void SetWindowType(const EWindowType& t);
00081 
00083         const EWindowType& GetWindowType() const;
00084 
00097         void SetZeroPadding(int z);
00098 
00100         int GetZeroPadding() const;
00101 
00106         void SetHopSize(TSize h);
00107 
00109         TSize GetHopSize() const;
00110 
00113         void SetSamplingRate(TData sr);
00114 
00116         TData GetSamplingRate() const;
00117 
00119 void Sync();
00120 
00121 
00122 private:
00123 
00125         void DefaultInit();
00126 
00129         void DefaultValues();
00130 
00132         TInt32 PowerOfTwo(TInt32 size);
00133 };
00134 
00135 }
00136 
00137 #endif
00138 
Generated by  doxygen 1.6.3