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

/home/pete/Work/TSE3.svn/tse3/src/tse3/util/Demidify.h

Go to the documentation of this file.
00001 /*
00002  * @(#)util/Demidify.h 3.00 3 April 2000
00003  *
00004  * Copyright (c) 2000 Pete Goodliffe (pete@cthree.org)
00005  *
00006  * This file is part of TSE3 - the Trax Sequencer Engine version 3.00.
00007  *
00008  * This library is modifiable/redistributable under the terms of the GNU
00009  * General Public License.
00010  *
00011  * You should have received a copy of the GNU General Public License along
00012  * with this program; see the file COPYING. If not, write to the Free Software
00013  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00014  *
00015  */
00016 
00017 #ifndef TSE3_UTIL_DEMIDIFY_H
00018 #define TSE3_UTIL_DEMIDIFY_H
00019 
00020 #include "tse3/Midi.h"
00021 
00022 #include <iostream>
00023 #include <exception>
00024 #include <cstddef>
00025 
00026 namespace TSE3
00027 {
00028     class Song;
00029     class Phrase;
00030     class Progress;
00031 
00032     namespace Util
00033     {
00037         class DemidifyException : public std::exception
00038         {
00039             public:
00040         };
00041 
00056         class Demidify
00057         {
00058             public:
00059 
00072                 Demidify(bool            compactParts,
00073                          bool            pullTrackParameters,
00074                          TSE3::Clock     partSize,
00075                          bool            aggressive,
00076                          TSE3::Progress *progress     = 0,
00077                          int             verbose      = 0,
00078                          std::ostream   &out          = std::cout);
00079 
00085                 void go(TSE3::Song *song);
00086 
00087             private:
00088 
00100                 void disectPhrase(TSE3::Song *song, size_t trackNo,
00101                                   int prog_base, int max_prog_delta);
00102 
00107                 void reduceParts(TSE3::Song *song, size_t trackNo);
00108 
00114                 int matchParts(TSE3::Song *song, size_t trackNo,
00115                                size_t startPos);
00116 
00117                 bool            compactParts;
00118                 bool            pullTrackParameters;
00119                 TSE3::Clock     partSize;
00120                 bool            aggressive;
00121                 TSE3::Progress *progress;
00122                 int             verbose;
00123                 std::ostream   &out;
00124 
00125                 TSE3::Song     *song;
00126         };
00127     }
00128 }
00129 
00130 #endif

Generated on Wed May 25 14:45:10 2005 for TSE3 by doxygen 1.3.2