SpectralSynthesisConfig.hxx

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 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 _SpectralSynthesisConfig_
00023 #define _SpectralSynthesisConfig_
00024 
00025 #include "ProcessingConfig.hxx"
00026 #include "WindowGeneratorConfig.hxx"
00027 #include "CircularShiftConfig.hxx"
00028 #include "IFFTConfig.hxx"
00029 
00030 namespace CLAM {
00031 
00035 class SpectralSynthesisConfig:public ProcessingConfig
00036 {
00037 
00038 friend class SpectralSynthesis;
00039 
00040 public:
00041         
00042         DYNAMIC_TYPE_USING_INTERFACE(SpectralSynthesisConfig,10,ProcessingConfig);
00044         DYN_ATTRIBUTE(0,public,WindowGeneratorConfig,AnalWindowGenerator);
00045         DYN_ATTRIBUTE(1,public,WindowGeneratorConfig,SynthWindowGenerator);
00046         DYN_ATTRIBUTE(2,public,CircularShiftConfig,CircularShift);
00047         DYN_ATTRIBUTE(3,public,IFFTConfig,IFFT);
00048         DYN_ATTRIBUTE(4,public,int, prZeroPadding);
00049         DYN_ATTRIBUTE(5,public,int,prSamplingRate);
00050         DYN_ATTRIBUTE(6,public,bool,Residual);
00051   //xamat: added this to be able to access from configurators
00052         DYN_ATTRIBUTE(7,public,int,prAnalWindowSize);
00053         DYN_ATTRIBUTE(8,public,EWindowType,prAnalWindowType);  
00054         DYN_ATTRIBUTE(9,public,int,prHopSize);
00055 
00056 //Config shortcuts
00057 
00058 public:
00063         void SetAnalWindowSize(TSize w);
00067         TSize GetAnalWindowSize() const;
00068 
00072         void SetAnalWindowType(const EWindowType& t);
00076         const EWindowType& GetAnalWindowType() const;
00077 
00082         void SetZeroPadding(int z);
00085         int GetZeroPadding() const;
00089         void SetSynthWindowSize(TSize w);
00093         TSize GetSynthWindowSize()const;
00094 
00099         void SetHopSize(TSize h);
00103         TSize GetHopSize() const;
00105         void SetSamplingRate(TData sr);
00107         TData GetSamplingRate() const;
00109         void SetSpectrumSize(TSize specSize);
00110         TSize GetSpectrumSize() const;
00111 
00112 private:
00113 
00114         void DefaultInit();
00115         void DefaultValues();
00117         void Sync();
00118 
00120         TInt32 PowerOfTwo(TInt32 size);
00121 };
00122 
00123 } // namespace CLAM
00124 
00125 #endif
00126 
Generated by  doxygen 1.6.3