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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1464 - (hide annotations) (download) (as text)
Thu Nov 1 17:14:21 2007 UTC (16 years, 5 months ago) by capela
File MIME type: text/x-c++hdr
File size: 2801 byte(s)
- Qt4 migration: missing copyright headers update.

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

  ViewVC Help
Powered by ViewVC