SMSAnalysisCore.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 __SMSAnalysisCore_hxx__
00023 #define __SMSAnalysisCore_hxx__
00024 
00025 #include "DataTypes.hxx"
00026 #include "SpectralPeakDetect.hxx"
00027 #include "FundFreqDetect.hxx"
00028 #include "SinTracking.hxx"
00029 #include "SpectrumSubstracter2.hxx"
00030 #include "SpectralAnalysis.hxx"
00031 #include "SMSAnalysisConfig.hxx"
00032 #include "Audio.hxx"
00033 #include "ProcessingComposite.hxx"
00034 #include "Spectrum.hxx"
00035 #include "SynthSineSpectrum.hxx"
00036 
00037 #include "OutPortPublisher.hxx"
00038 #include "AudioInPortPublisher.hxx"
00039 
00040 namespace CLAM 
00041 {
00042 
00043 class Segment;
00044 class Fundamental;
00045 class ProcessingConfig;
00046 class SpectralPeakArray;
00047 
00049 class SMSAnalysisCore : public ProcessingComposite
00050 {
00051 
00052 public:
00053         
00054 // Processing Object compliance methods.
00055 
00056         const char *GetClassName() const {return "SMSAnalysisCore";}
00057 
00058         SMSAnalysisCore(SMSAnalysisConfig& config);
00059         SMSAnalysisCore();
00060         ~SMSAnalysisCore();
00061         
00062                         
00063         const ProcessingConfig &GetConfig() const {return mConfig;}
00064 
00066         bool Do(void);
00067 
00068         bool ConcreteStart();
00069 private:
00070 
00072         SMSAnalysisConfig mConfig;
00073 
00074 // The internal Processing Objects
00075 
00078         SpectralAnalysis mSinSpectralAnalysis;
00081         SpectralAnalysis mResSpectralAnalysis;
00084         SpectralPeakDetect              mPeakDetect;
00087         FundFreqDetect  mFundDetect;
00090         SinTracking             mSinTracking;
00094         SynthSineSpectrum               mSynthSineSpectrum;
00098         SpectrumSubstracter2            mSpecSubstracter;
00099 
00100 // Internal convenience methods.
00101 
00103         void AttachChildren();
00105         bool ConfigureChildren();
00107         void ConfigureData();
00108 
00109         
00111         bool ConcreteConfigure(const ProcessingConfig&);
00112 
00114         void ConnectAndPublishPorts();
00115 
00117         AudioInPortPublisher                    mInputAudio; // audio input
00118         OutPortPublisher<Spectrum>              mOutputResSpectrum; // output of resSpectralAnalysis
00119         OutPortPublisher<Spectrum>              mOutputSinSpectrum; // output of sinSpectralAnalysis
00120         OutPortPublisher<SpectralPeakArray>     mOutputSpectralPeaks; // output of sintracking
00121         OutPortPublisher<Fundamental>           mOutputFundamental; // output of fundamental
00122         OutPortPublisher<Spectrum>              mOutputSubstractedSpectrum; // output of spectrumSubstracter
00123 };
00124 
00125 } //namespace CLAM
00126 
00127 #endif // __SMSAnalysisCore_hxx__
00128 
Generated by  doxygen 1.6.3