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/MidiParams.h

Go to the documentation of this file.
00001 /*
00002  * @(#)MidiParams.h 3.00 1 June 1999
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_MIDIPARAMS_H
00018 #define TSE3_MIDIPARAMS_H
00019 
00020 #include "tse3/listen/MidiParams.h"
00021 
00022 #include "tse3/Notifier.h"
00023 #include "tse3/Playable.h"
00024 #include "tse3/Serializable.h"
00025 #include "tse3/Filter.h"
00026 
00027 namespace TSE3
00028 {
00051     class MidiParams : public Playable,
00052                        public Filter,
00053                        public Serializable,
00054                        public Notifier<MidiParamsListener>
00055     {
00056         public:
00057 
00061             MidiParams();
00062             MidiParams(const MidiParams &);
00063             virtual ~MidiParams();
00064             MidiParams &operator=(const MidiParams &);
00065 
00069             static const int off = -1;
00070 
00075             static const int forceNone = -2;
00076 
00083             int bankLSB() const { return _bankLSB; }
00084 
00091             void setBankLSB(int b);
00092 
00099             int bankMSB() const { return _bankMSB; }
00100 
00107             void setBankMSB(int b);
00108 
00115             int program() const { return _program; }
00116 
00123             void setProgram(int p);
00124 
00131             int pan() const { return _pan; }
00132 
00139             void setPan(int p);
00140 
00147             int reverb() const { return _reverb; }
00148 
00155             void setReverb(int r);
00156 
00163             int chorus() const { return _chorus; }
00164 
00171             void setChorus(int c);
00172 
00179             int volume() const { return _volume; }
00180 
00187             void setVolume(int v);
00188 
00192             virtual PlayableIterator *iterator(Clock index);
00193 
00197             virtual Clock lastClock() const;
00198 
00202             virtual void save(std::ostream &o, int i) const;
00203 
00207             virtual void load(std::istream &in, SerializableLoadInfo &info);
00208 
00212             virtual MidiEvent filter(const MidiEvent &e) const;
00213 
00214         private:
00215 
00216             /*
00217              * Parameter values (0-127, -1 = none, -2 = force none)
00218              */
00219 
00220             int _bankLSB;
00221             int _bankMSB;
00222             int _program;
00223             int _pan;
00224             int _reverb;
00225             int _chorus;
00226             int _volume;
00227     };
00228 }
00229 
00230 #endif

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