00001 #ifndef INCLUDE_BREAKPOINTENVELOPE_H 00002 #define INCLUDE_BREAKPOINTENVELOPE_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 * BreakpointEnvelope.h 00026 * 00027 * Definition of class BreakpointEnvelope. 00028 * 00029 * Kelly Fitz, 21 July 2000 00030 * loris@cerlsoundgroup.org 00031 * 00032 * http://www.cerlsoundgroup.org/Loris/ 00033 * 00034 */ 00035 00036 #include "Envelope.h" 00037 #include <map> 00038 00039 // begin namespace 00040 namespace Loris { 00041 00042 // --------------------------------------------------------------------------- 00043 // class BreakpointEnvelope 00044 // 00068 // 00069 class BreakpointEnvelope : public Envelope, private std::map< double, double > 00070 { 00071 // -- public interface -- 00072 public: 00073 // -- construction -- 00074 00077 BreakpointEnvelope( void ); 00078 00085 explicit BreakpointEnvelope( double initialValue ); 00086 00087 // compiler-generated copy, assignment, and destruction are OK. 00088 00089 // -- Envelope interface -- 00090 00093 virtual BreakpointEnvelope * clone( void ) const; 00094 00100 virtual double valueAt( double t ) const; 00101 00102 // -- envelope composition -- 00103 00111 void insert( double time, double value ); 00112 00116 void insertBreakpoint( double time, double value ) 00117 { insert( time, value ); } 00118 00119 // -- interface inherited from std::map -- 00120 00121 using std::map< double, double >::size; 00122 using std::map< double, double >::empty; 00123 using std::map< double, double >::begin; 00124 using std::map< double, double >::end; 00125 using std::map< double, double >::size_type; 00126 using std::map< double, double >::value_type; 00127 using std::map< double, double >::iterator; 00128 using std::map< double, double >::const_iterator; 00129 00130 }; // end of class BreakpointEnvelope 00131 00132 } // end of namespace Loris 00133 00134 #endif /* ndef INCLUDE_BREAKPOINTENVELOPE_H */
1.3.4