/[svn]/qsampler/trunk/src/qsamplerInstrument.h
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerInstrument.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 980 by capela, Sun Dec 17 22:29:29 2006 UTC revision 1558 by capela, Thu Dec 6 09:35:33 2007 UTC
# Line 1  Line 1 
1  // qsamplerInstrument.h  // qsamplerInstrument.h
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2006, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.
5       Copyright (C) 2007, Christian Schoenebeck
6     This program is free software; you can redistribute it and/or  
7     modify it under the terms of the GNU General Public License     This program is free software; you can redistribute it and/or
8     as published by the Free Software Foundation; either version 2     modify it under the terms of the GNU General Public License
9     of the License, or (at your option) any later version.     as published by the Free Software Foundation; either version 2
10       of the License, or (at your option) any later version.
11     This program is distributed in the hope that it will be useful,  
12     but WITHOUT ANY WARRANTY; without even the implied warranty of     This program is distributed in the hope that it will be useful,
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     GNU General Public License for more details.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15       GNU General Public License for more details.
16     You should have received a copy of the GNU General Public License along  
17     with this program; if not, write to the Free Software Foundation, Inc.,     You should have received a copy of the GNU General Public License along
18     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.     with this program; if not, write to the Free Software Foundation, Inc.,
19       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  *****************************************************************************/  
21    *****************************************************************************/
22  #ifndef __qsamplerInstrument_h  
23  #define __qsamplerInstrument_h  #ifndef __qsamplerInstrument_h
24    #define __qsamplerInstrument_h
25  #include <qstringlist.h>  
26    #include <QStringList>
27    
28  //-------------------------------------------------------------------------  namespace QSampler {
29  // qsamplerInstrument - MIDI instrument map structure.  
30  //  //-------------------------------------------------------------------------
31    // QSampler::Instrument - MIDI instrument map structure.
32  class qsamplerInstrument  //
33  {  
34  public:  class Instrument
35    {
36          // Constructor.  public:
37          qsamplerInstrument(int iMap = 0, int iBank = -1, int iProg = -1);  
38            // Constructor.
39          // Default destructor.          Instrument(int iMap = 0, int iBank = -1, int iProg = -1);
40          ~qsamplerInstrument();  
41            // Default destructor.
42          // Instrument accessors.          ~Instrument();
43          void setMap(int iMap);  
44          int map() const;          // Instrument accessors.
45            void setMap(int iMap);
46          void setBank(int iBank);          int map() const;
47          int bank() const;  
48            void setBank(int iBank);
49          void setProg(int iProg);          int bank() const;
50          int prog() const;  
51            void setProg(int iProg);
52          void setName(const QString& sName);          int prog() const;
53          const QString& name() const;  
54            void setName(const QString& sName);
55          void setEngineName(const QString& sEngineName);          const QString& name() const;
56          const QString& engineName() const;  
57            void setEngineName(const QString& sEngineName);
58          void setInstrumentFile(const QString& sInstrumentFile);          const QString& engineName() const;
59          const QString& instrumentFile() const;  
60            void setInstrumentFile(const QString& sInstrumentFile);
61          const QString& instrumentName() const;          const QString& instrumentFile() const;
62    
63          void setInstrumentNr(int InstrumentNr);          const QString& instrumentName() const;
64          int instrumentNr() const;  
65            void setInstrumentNr(int InstrumentNr);
66          void setVolume(float fVolume);          int instrumentNr() const;
67          float volume() const;  
68            void setVolume(float fVolume);
69          void setLoadMode(int iLoadMode);          float volume() const;
70          int loadMode() const;  
71            void setLoadMode(int iLoadMode);
72          // Sync methods.          int loadMode() const;
73          bool getInstrument();  
74          bool mapInstrument();          // Sync methods.
75          bool unmapInstrument();          bool getInstrument();
76            bool mapInstrument();
77          // Instrument map names initialization...          bool unmapInstrument();
78          static QStringList getMapNames();  
79          static QString     getMapName(int iMidiMap);          // Instrument map names initialization...
80            static QStringList getMapNames();
81  private:          static QString     getMapName(int iMidiMap);
82    
83          // Instance variables.  private:
84          int     m_iMap;  
85          int     m_iBank;          // Instance variables.
86          int     m_iProg;          int     m_iMap;
87          QString m_sName;          int     m_iBank;
88          QString m_sEngineName;          int     m_iProg;
89          QString m_sInstrumentFile;          QString m_sName;
90          QString m_sInstrumentName;          QString m_sEngineName;
91          int     m_iInstrumentNr;          QString m_sInstrumentFile;
92          float   m_fVolume;          QString m_sInstrumentName;
93          int     m_iLoadMode;          int     m_iInstrumentNr;
94            float   m_fVolume;
95  };          int     m_iLoadMode;
96    };
97    
98  #endif  // __qsamplerInstrument_h  } // namespace QSampler
99    
100    #endif  // __qsamplerInstrument_h
101  // end of qsamplerInstrument.h  
102    
103    // end of qsamplerInstrument.h

Legend:
Removed from v.980  
changed lines
  Added in v.1558

  ViewVC Help
Powered by ViewVC