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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 980 - (show annotations) (download) (as text)
Sun Dec 17 22:29:29 2006 UTC (17 years, 3 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 // 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 #include <qstringlist.h>
26
27
28 //-------------------------------------------------------------------------
29 // qsamplerInstrument - MIDI instrument map structure.
30 //
31
32 class qsamplerInstrument
33 {
34 public:
35
36 // Constructor.
37 qsamplerInstrument(int iMap = 0, int iBank = -1, int iProg = -1);
38
39 // Default destructor.
40 ~qsamplerInstrument();
41
42 // Instrument accessors.
43 void setMap(int iMap);
44 int map() const;
45
46 void setBank(int iBank);
47 int bank() const;
48
49 void setProg(int iProg);
50 int prog() const;
51
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 bool getInstrument();
74 bool mapInstrument();
75 bool unmapInstrument();
76
77 // Instrument map names initialization...
78 static QStringList getMapNames();
79 static QString getMapName(int iMidiMap);
80
81 private:
82
83 // Instance variables.
84 int m_iMap;
85 int m_iBank;
86 int m_iProg;
87 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