Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | Related Pages

TSound.h

00001 /*
00002 
00003   MusicXML Library
00004   Copyright (C) 2003  Grame
00005 
00006   This library is free software; you can redistribute it and/or
00007   modify it under the terms of the GNU Lesser General Public
00008   License as published by the Free Software Foundation; either
00009   version 2.1 of the License, or (at your option) any later version.
00010 
00011   This library is distributed in the hope that it will be useful,
00012   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014   Lesser General Public License for more details.
00015 
00016   You should have received a copy of the GNU Lesser General Public
00017   License along with this library; if not, write to the Free Software
00018   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00020   Grame Research Laboratory, 9 rue du Garet, 69001 Lyon - France
00021   grame@grame.fr
00022 
00023 */
00024 
00025 #ifndef __TSound__
00026 #define __TSound__
00027 
00028 #include "exports.h"
00029 #include "TMidiInstrument.h"
00030 #include "common.h"
00031 #include "conversions.h"
00032 
00033 namespace MusicXML 
00034 {
00035 
00068 class EXP TSound : public TMusicData {
00069 
00070     public:
00071         enum { yes=-2, undefined=-1 };
00072         EXP friend SMARTP<TSound> newSound();
00073         
00074         virtual void accept(TScoreVisitor& visitor);
00075 
00077         void setTempo(long tempo);
00079         void setDynamics(long dyn);
00081         void setDacapo(YesNo::type yn);
00083         void setSegno(long segno); 
00085         void setDalsegno(long ds);
00087         void setCoda(long coda);
00089         void setTocoda(long tc);
00091         void setDivisions(long div);
00093         void setForwardRepeat(YesNo::type yn);
00095         void setFine(long fine);
00097         void setPizzicato(YesNo::type pizz);
00099         void setMidiChannel(long chan);
00101         void setMidiIntrument(long instr);
00102 
00103         long add(const SMidiInstrument& instr);
00104 
00105         long getTempo() const           { return fTempo; }
00106         long getDynamics() const        { return fDynamics; }
00107         YesNo::type getDacapo() const   { return fDacapo; }
00108         long getSegno() const           { return fSegno; }
00109         long getDalsegno() const        { return fDalsegno; }
00110         long getCoda() const            { return fCoda; }
00111         long getTocoda() const          { return fTocoda; }
00112         long getDivisions() const       { return fDivisions; }
00113         YesNo::type getForwardRepeat() const { return fForwardRepeat; }
00114         long getFine() const            { return fFine; }
00115         YesNo::type getPizzicato() const        { return fPizzicato; }
00116         long getMidiChannel() const     { return fMidiChannel; }
00117         long getMidiIntrument() const   { return fMidiIntrument; }
00118 
00119         vvector<SMidiInstrument>& instrumentList() { return fInstrumentList; }
00120                 
00121     protected:
00122         TSound() { init(); }
00123         virtual ~TSound() {}
00124         void    init();
00125 
00126     private:
00127         long fTempo;
00128         long fDynamics;
00129         YesNo::type fDacapo;
00130         long fSegno; 
00131         long fDalsegno;
00132         long fCoda;
00133         long fTocoda;
00134         long fDivisions;
00135         YesNo::type fForwardRepeat;
00136         long fFine;
00137         YesNo::type fPizzicato;
00138         long fMidiChannel;
00139         long fMidiIntrument;
00140         vvector<SMidiInstrument>    fInstrumentList;
00141 };
00142 typedef SMARTP<TSound> SSound;
00143 
00144 } // namespace MusicXML
00145 
00146 
00147 #endif

Generated on Tue Mar 23 09:49:44 2004 for LibMusicXML by doxygen 1.3.3