/[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 1461 by schoenebeck, Sun Oct 28 23:30:36 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
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>  
26  #include <QMetaType>  #include <QStringList>
27    
28    namespace QSampler {
29  //-------------------------------------------------------------------------  
30  // qsamplerInstrument - MIDI instrument map structure.  //-------------------------------------------------------------------------
31  //  // QSampler::Instrument - MIDI instrument map structure.
32    //
33  class qsamplerInstrument  
34  {  class Instrument
35  public:  {
36    public:
37          // Constructor.  
38          qsamplerInstrument(int iMap = 0, int iBank = -1, int iProg = -1);          // Constructor.
39            Instrument(int iMap = 0, int iBank = -1, int iProg = -1);
40          // Default destructor.  
41          ~qsamplerInstrument();          // Default destructor.
42            ~Instrument();
43          // Instrument accessors.  
44          void setMap(int iMap);          // Instrument accessors.
45          int map() const;          void setMap(int iMap);
46            int map() const;
47          void setBank(int iBank);  
48          int bank() const;          void setBank(int iBank);
49            int bank() const;
50          void setProg(int iProg);  
51          int prog() const;          void setProg(int iProg);
52            int prog() const;
53          void setName(const QString& sName);  
54          const QString& name() const;          void setName(const QString& sName);
55            const QString& name() const;
56          void setEngineName(const QString& sEngineName);  
57          const QString& engineName() const;          void setEngineName(const QString& sEngineName);
58            const QString& engineName() const;
59          void setInstrumentFile(const QString& sInstrumentFile);  
60          const QString& instrumentFile() const;          void setInstrumentFile(const QString& sInstrumentFile);
61            const QString& instrumentFile() const;
62          const QString& instrumentName() const;  
63            const QString& instrumentName() const;
64          void setInstrumentNr(int InstrumentNr);  
65          int instrumentNr() const;          void setInstrumentNr(int InstrumentNr);
66            int instrumentNr() const;
67          void setVolume(float fVolume);  
68          float volume() const;          void setVolume(float fVolume);
69            float volume() const;
70          void setLoadMode(int iLoadMode);  
71          int loadMode() const;          void setLoadMode(int iLoadMode);
72            int loadMode() const;
73          // Sync methods.  
74          bool getInstrument();          // Sync methods.
75          bool mapInstrument();          bool getInstrument();
76          bool unmapInstrument();          bool mapInstrument();
77            bool unmapInstrument();
78          // Instrument map names initialization...  
79          static QStringList getMapNames();          // Instrument map names initialization...
80          static QString     getMapName(int iMidiMap);          static QStringList getMapNames();
81            static QString     getMapName(int iMidiMap);
82  private:  
83    private:
84          // Instance variables.  
85          int     m_iMap;          // Instance variables.
86          int     m_iBank;          int     m_iMap;
87          int     m_iProg;          int     m_iBank;
88          QString m_sName;          int     m_iProg;
89          QString m_sEngineName;          QString m_sName;
90          QString m_sInstrumentFile;          QString m_sEngineName;
91          QString m_sInstrumentName;          QString m_sInstrumentFile;
92          int     m_iInstrumentNr;          QString m_sInstrumentName;
93          float   m_fVolume;          int     m_iInstrumentNr;
94          int     m_iLoadMode;          float   m_fVolume;
95            int     m_iLoadMode;
96  };  };
97    
98  // so we can use it i.e. through QVariant  } // namespace QSampler
99  Q_DECLARE_METATYPE(qsamplerInstrument)  
100    #endif  // __qsamplerInstrument_h
101    
102  #endif  // __qsamplerInstrument_h  
103    // end of qsamplerInstrument.h
   
 // end of qsamplerInstrument.h  

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

  ViewVC Help
Powered by ViewVC