CFugue
Instrument.h
Go to the documentation of this file.
1 /*
2  This is part of CFugue, a C++ Runtime for MIDI Score Programming
3  Copyright (C) 2009 Gopalakrishna Palem
4 
5  For links to further information, or to contact the author,
6  see <http://cfugue.sourceforge.net/>.
7 
8  $LastChangedDate: 2013-12-18 10:59:57 +0530 (Wed, 18 Dec 2013) $
9  $Rev: 197 $
10  $LastChangedBy: krishnapg $
11 */
12 
13 #ifndef __MUSICINSTRUMENT_H__0823ABB9_BB3E_46a6_84DE_BBA9F4E7F821__
14 #define __MUSICINSTRUMENT_H__0823ABB9_BB3E_46a6_84DE_BBA9F4E7F821__
15 
16 /** @file Instrument.h
17  * \brief Declares Instrument class
18  */
19 #include "Dictionary.h"
20 
21 namespace CFugue
22 {
23  /**
24  * Represents MIDI instrument objects. Useful for instrument changes,
25  * also known as <i>patch changes</i>.
26  */
27  class Instrument
28  {
29  unsigned char m_nInstrumentID; //MIDI instrument ID in range [0, 127]
30  public:
31  inline Instrument(const unsigned char nInstrumentID)
32  : m_nInstrumentID(nInstrumentID)
33  { }
34 
35  ///<Summary>Returns the MIDI Instrument ID this object represents</Summary>
36  inline unsigned char GetInstrumentID() const { return m_nInstrumentID; }
37 
38  /// <Summary>Returns the name of the music instrument this object represents</Summary>
39  MString GetInstrumentName() const;
40 
41  /// Populates the standard musical instrument Macro defintions into Music String Dictionary
42  static void PopulateStandardDefinitions(DICTIONARY& stdDefns);
43  };
44 
45 } // namespace CFugue
46 
47 #endif // __MUSICINSTRUMENT_H__0823ABB9_BB3E_46a6_84DE_BBA9F4E7F821__
Instrument(const unsigned char nInstrumentID)
Summary>Returns the MIDI Instrument ID this object represents
Definition: Instrument.h:31
static void PopulateStandardDefinitions(DICTIONARY &stdDefns)
Populates the standard musical instrument Macro defintions into Music String Dictionary.
Definition: Instrument.cpp:158
MString GetInstrumentName() const
Returns the name of the music instrument this object represents
Definition: Instrument.cpp:153
std::map< MString, MString, StringLess< const TCHAR * > > DICTIONARY
Definition: Dictionary.h:37
Declares Dictionary type used by the Parsers.

CFugue, the C++ Music Programming Library © Copyright 2009 Cenacle Research India Private Limited Gopalakrishna Palem