00001 #ifndef INCLUDE_FREQUENCYREFERENCE_H 00002 #define INCLUDE_FREQUENCYREFERENCE_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-2010 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 * FrequencyReference.h 00026 * 00027 * Definition of class FrequencyReference. 00028 * 00029 * Kelly Fitz, 3 Dec 2001 00030 * loris@cerlsoundgroup.org 00031 * 00032 * http://www.cerlsoundgroup.org/Loris/ 00033 * 00034 */ 00035 00036 #include "Envelope.h" 00037 #include "PartialList.h" 00038 #include <memory> 00039 00040 // begin namespace 00041 namespace Loris { 00042 00043 class LinearEnvelope; 00044 00045 // --------------------------------------------------------------------------- 00046 // class FrequencyReference 00047 // 00056 // 00057 class FrequencyReference : public Envelope 00058 { 00059 // -- instance variables -- 00060 std::auto_ptr< LinearEnvelope > _env; 00061 00062 // -- public interface -- 00063 public: 00064 // -- construction -- 00065 00080 FrequencyReference( PartialList::const_iterator begin, 00081 PartialList::const_iterator end, 00082 double minFreq, double maxFreq, long numSamps ); 00083 00096 FrequencyReference( PartialList::const_iterator begin, 00097 PartialList::const_iterator end, 00098 double minFreq, double maxFreq ); 00099 00100 00103 FrequencyReference( const FrequencyReference & other ); 00104 00107 FrequencyReference & operator= ( const FrequencyReference & other ); 00108 00110 ~FrequencyReference(); 00111 00112 // -- conversion to LinearEnvelope -- 00113 00116 LinearEnvelope envelope( void ) const; 00117 00118 // -- Envelope interface -- 00119 00122 virtual FrequencyReference * clone( void ) const; 00123 00126 virtual double valueAt( double x ) const; 00127 00128 }; // end of class FrequencyReference 00129 00130 } // end of namespace Loris 00131 00132 #endif // ndef INCLUDE_FREQUENCYREFERENCE_H