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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 962 - (hide annotations) (download) (as text)
Sun Dec 3 18:27:23 2006 UTC (17 years, 4 months ago) by capela
File MIME type: text/x-c++hdr
File size: 2421 byte(s)
* Adding preliminary MIDI instrument mapping support; now
  with an instrument list widget and editing capabilities.

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     #include <qstring.h>
26    
27    
28     //-------------------------------------------------------------------------
29     // qsamplerInstrument - MIDI instrument map structure.
30     //
31    
32     class qsamplerInstrument
33     {
34     public:
35    
36     // Constructor.
37     qsamplerInstrument(int iBank = -1, int iProg = -1);
38    
39     // Default destructor.
40     ~qsamplerInstrument();
41    
42     // Instrument accessors.
43     void setBank(int iBank);
44     int bank() const;
45    
46     void setProgram(int iProgram);
47     int program() const;
48    
49     void setName(const QString& sName);
50     const QString& name() const;
51    
52     void setEngineName(const QString& sEngineName);
53     const QString& engineName() const;
54    
55     void setInstrumentFile(const QString& sInstrumentFile);
56     const QString& instrumentFile() const;
57    
58     const QString& instrumentName() const;
59    
60     void setInstrumentNr(int InstrumentNr);
61     int instrumentNr() const;
62    
63     void setVolume(float fVolume);
64     float volume() const;
65    
66     void setLoadMode(int iLoadMode);
67     int loadMode() const;
68    
69     // Sync methods.
70     bool get();
71     bool map();
72     bool unmap();
73    
74     private:
75    
76     // Instance variables.
77     int m_iBank;
78     int m_iProgram;
79     QString m_sName;
80     QString m_sEngineName;
81     QString m_sInstrumentFile;
82     QString m_sInstrumentName;
83     int m_iInstrumentNr;
84     float m_fVolume;
85     int m_iLoadMode;
86    
87     };
88    
89    
90     #endif // __qsamplerInstrument_h
91    
92    
93     // end of qsamplerInstrument.h

  ViewVC Help
Powered by ViewVC