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

Legend:
Removed from v.1492  
changed lines
  Added in v.3555

  ViewVC Help
Powered by ViewVC