/[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 962 by capela, Sun Dec 3 18:27:23 2006 UTC revision 1464 by capela, Thu Nov 1 17:14:21 2007 UTC
# Line 1  Line 1 
1  // qsamplerInstrument.h  // qsamplerInstrument.h
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2006, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.
5       Copyright (C) 2007, Christian Schoenebeck
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License     modify it under the terms of the GNU General Public License
# Line 22  Line 23 
23  #ifndef __qsamplerInstrument_h  #ifndef __qsamplerInstrument_h
24  #define __qsamplerInstrument_h  #define __qsamplerInstrument_h
25    
26  #include <qstring.h>  #include <QStringList>
27    #include <QMetaType>
28    
29    
30  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
# Line 34  class qsamplerInstrument Line 36  class qsamplerInstrument
36  public:  public:
37    
38          // Constructor.          // Constructor.
39          qsamplerInstrument(int iBank = -1, int iProg = -1);          qsamplerInstrument(int iMap = 0, int iBank = -1, int iProg = -1);
40    
41          // Default destructor.          // Default destructor.
42          ~qsamplerInstrument();          ~qsamplerInstrument();
43    
44          // Instrument accessors.          // Instrument accessors.
45            void setMap(int iMap);
46            int map() const;
47    
48          void setBank(int iBank);          void setBank(int iBank);
49          int bank() const;          int bank() const;
50    
51          void setProgram(int iProgram);          void setProg(int iProg);
52          int program() const;          int prog() const;
53    
54          void setName(const QString& sName);          void setName(const QString& sName);
55          const QString& name() const;          const QString& name() const;
# Line 67  public: Line 72  public:
72          int loadMode() const;          int loadMode() const;
73    
74          // Sync methods.          // Sync methods.
75          bool get();          bool getInstrument();
76          bool map();          bool mapInstrument();
77          bool unmap();          bool unmapInstrument();
78    
79            // Instrument map names initialization...
80            static QStringList getMapNames();
81            static QString     getMapName(int iMidiMap);
82    
83  private:  private:
84    
85          // Instance variables.          // Instance variables.
86            int     m_iMap;
87          int     m_iBank;          int     m_iBank;
88          int     m_iProgram;          int     m_iProg;
89          QString m_sName;          QString m_sName;
90          QString m_sEngineName;          QString m_sEngineName;
91          QString m_sInstrumentFile;          QString m_sInstrumentFile;
# Line 86  private: Line 96  private:
96    
97  };  };
98    
99    // so we can use it i.e. through QVariant
100    Q_DECLARE_METATYPE(qsamplerInstrument)
101    
102    
103  #endif  // __qsamplerInstrument_h  #endif  // __qsamplerInstrument_h
104    

Legend:
Removed from v.962  
changed lines
  Added in v.1464

  ViewVC Help
Powered by ViewVC