00001 #ifndef INCLUDE_BREAKPOINT_H 00002 #define INCLUDE_BREAKPOINT_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 * Breakpoint.h 00026 * 00027 * Definition of class Loris::Breakpoint. 00028 * 00029 * Kelly Fitz, 16 Aug 99 00030 * loris@cerlsoundgroup.org 00031 * 00032 * http://www.cerlsoundgroup.org/Loris/ 00033 * 00034 */ 00035 00036 // begin namespace 00037 namespace Loris { 00038 00039 00040 // --------------------------------------------------------------------------- 00041 // class Breakpoint 00042 // 00057 // 00058 class Breakpoint 00059 { 00060 // -- instance variables -- 00061 double _frequency; 00062 double _amplitude; 00063 double _bandwidth; 00064 double _phase; 00065 00066 // -- public Breakpoint interface -- 00067 00068 public: 00069 // -- construction -- 00070 00073 Breakpoint( void ); 00074 00082 Breakpoint( double f, double a, double b, double p = 0. ); 00083 00084 // (use compiler-generated destructor, copy, and assign) 00085 00086 // -- access -- 00088 double amplitude( void ) const { return _amplitude; } 00089 00091 double bandwidth( void ) const { return _bandwidth; } 00092 00094 double frequency( void ) const { return _frequency; } 00095 00097 double phase( void ) const { return _phase; } 00098 00099 // -- mutation -- 00103 void setAmplitude( double x ) { _amplitude = x; } 00104 00108 void setBandwidth( double x ) { _bandwidth = x; } 00109 00113 void setFrequency( double x ) { _frequency = x; } 00114 00118 void setPhase( double x ) { _phase = x; } 00119 00127 void addNoiseEnergy( double enoise ); 00128 00129 }; // end of class Breakpoint 00130 00131 } // end of namespace Loris 00132 00133 #endif /* ndef INCLUDE_BREAKPOINT_H */