Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

Analyzer.h

00001 #ifndef INCLUDE_ANALYZER_H
00002 #define INCLUDE_ANALYZER_H
00003 /*
00004  * This is the Loris C++ Class Library, implementing analysis, 
00005  * manipulation, and synthesis of digitized sounds using the Reassigned 
00006  * Bandwidth-Enhanced Additive Sound Model.
00007  *
00008  * Loris is Copyright (c) 1999-2004 by Kelly Fitz and Lippold Haken
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY, without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *
00024  *
00025  * Analyzer.h
00026  *
00027  * Definition of class Loris::Analyzer.
00028  *
00029  * Kelly Fitz, 5 Dec 99
00030  * loris@cerlsoundgroup.org
00031  *
00032  * http://www.cerlsoundgroup.org/Loris/
00033  *
00034  */
00035 #include <memory>
00036 #include <vector>
00037 #include "Partial.h"
00038 #include "PartialList.h"
00039 
00040 //  begin namespace
00041 namespace Loris {
00042 
00043 class Analyzer_imp;
00044 class Envelope;
00045 
00046 // ---------------------------------------------------------------------------
00047 //  class Analyzer
00048 //
00067 //
00068 class Analyzer
00069 {
00070 //  -- instance variables --
00071     std::auto_ptr< Analyzer_imp > _imp;     
00072                 
00073 //  -- public interface --
00074 public:
00075 
00076 //  -- construction --
00077 
00084     explicit Analyzer( double resolutionHz );
00085     
00095     Analyzer( double resolutionHz, double windowWidthHz );
00096 
00102     Analyzer( const Analyzer & other );
00103 
00105     ~Analyzer( void );
00106 
00112     Analyzer & operator=( const Analyzer & rhs );
00113 
00114 //  -- configuration --
00115 
00132         void configure( double resolutionHz, double windowWidthHz );
00133 
00134 //  -- analysis --
00135 
00142     void analyze( const std::vector<double> & vec, double srate );
00143     
00151     void analyze( const double * bufBegin, const double * bufEnd, double srate );
00152     
00153 //  -- tracking analysis --
00154 
00164     void analyze( const std::vector<double> & vec, double srate, 
00165                   const Envelope & reference );
00166     
00178     void analyze( const double * bufBegin, const double * bufEnd, double srate,
00179                   const Envelope & reference );
00180     
00181 //  -- parameter access --
00182 
00185     double ampFloor( void ) const;
00186 
00191     bool associateBandwidth( void ) const;
00192 
00196     double bwRegionWidth( void ) const;
00197 
00202     double cropTime( void ) const;
00203 
00206     double freqDrift( void ) const;
00207 
00210     double freqFloor( void ) const;
00211 
00214     double freqResolution( void ) const;
00215 
00219     double hopTime( void ) const;
00220 
00227     double sidelobeLevel( void ) const;
00228 
00231     double windowWidth( void ) const;
00232      
00233 //  -- parameter mutation --
00234 
00239     void setAmpFloor( double x );
00240 
00246     void setBwRegionWidth( double x );
00247 
00254     void setCropTime( double x );
00255 
00260     void setFreqDrift( double x );
00261 
00266     void setFreqFloor( double x );
00267 
00273     void setFreqResolution( double x );
00274 
00279     void setHopTime( double x );
00280 
00289     void setSidelobeLevel( double x );
00290 
00295     void setWindowWidth( double x );
00296 
00297 //  -- PartialList access --
00298 
00301     PartialList & partials( void );
00302 
00305     const PartialList & partials( void ) const;
00306     
00307 };  //  end of class Analyzer
00308 
00309 }   //  end of namespace Loris
00310 
00311 #endif /* ndef INCLUDE_ANALYZER_H */

Generated on Thu Apr 14 22:01:55 2005 for Loris by doxygen 1.3.4