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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 980 - (hide annotations) (download) (as text)
Sun Dec 17 22:29:29 2006 UTC (17 years, 4 months ago) by capela
File MIME type: text/x-c++hdr
File size: 2650 byte(s)
* Revised and extended MIDI instrument mapping feature; this time
  two (2) MIDI maps are being implicitly created, ones designated
  as 'Chromatic' (0) and another as 'Drum Kits' (1), which can be
  assigned to each sampler channel. (ATTN: this commit elevates the
  requirements for liblscp >= 0.5.0, also on todays CVS and pending
  proper release very soon).

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

  ViewVC Help
Powered by ViewVC