00001 #ifndef INCLUDE_IMPORTLEMUR_H 00002 #define INCLUDE_IMPORTLEMUR_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 * ImportLemur.h 00026 * 00027 * Definition of class Loris::ImportLemur for importing Partials stored 00028 * in Lemur 5 alpha files. 00029 * 00030 * Kelly Fitz, 10 Sept 1999 00031 * loris@cerlsoundgroup.org 00032 * 00033 * http://www.cerlsoundgroup.org/Loris/ 00034 * 00035 */ 00036 00037 #include "PartialList.h" 00038 #include "LorisExceptions.h" 00039 #include <string> 00040 00041 // begin namespace 00042 namespace Loris { 00043 00044 // --------------------------------------------------------------------------- 00045 // class ImportLemur 00046 // 00047 class ImportLemur 00048 { 00049 // -- instance variables -- 00050 PartialList _partials; // collect Partials here 00051 00052 // -- public interface -- 00053 public: 00054 // construction: 00055 // (compiler can generate destructor) 00056 ImportLemur( const std::string & fname, double bweCutoff = 1000 ); 00057 00058 // PartialList access: 00059 PartialList & partials( void ) { return _partials; } 00060 const PartialList & partials( void ) const { return _partials; } 00061 00062 // -- unimplemented -- 00063 private: 00064 ImportLemur( const ImportLemur & other ); 00065 ImportLemur & operator = ( const ImportLemur & rhs ); 00066 00067 }; // end of class ImportLemur 00068 00069 // --------------------------------------------------------------------------- 00070 // class ImportException 00071 // 00072 // Class of exceptions thrown when there is an error importing 00073 // Partials. 00074 // 00075 class ImportException : public Exception 00076 { 00077 public: 00078 ImportException( const std::string & str, const std::string & where = "" ) : 00079 Exception( std::string("Import Error -- ").append( str ), where ) {} 00080 }; 00081 00082 } // end of namespace Loris 00083 00084 #endif /* ndef INCLUDE_IMPORTLEMUR_H */