CFugue
Talam.h
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 _TALAM_H__D487B423_41C7_4ec5_BA4F_EB0D375C7425__
14 #define _TALAM_H__D487B423_41C7_4ec5_BA4F_EB0D375C7425__
15 
16 #include "Dictionary.h"
17 
18 namespace CFugue
19 {
20  /// <Summary>Class representing Carnatic Music Talam</Summary>
21  class Talam
22  {
23  unsigned short m_nTalam;
24  public:
25  enum
26  {
27  DEFAULT_VALUE = 8 ///< Defaults to Adi Talam
28  };
29  inline Talam() : m_nTalam(DEFAULT_VALUE)
30  {
31  }
32  inline Talam(unsigned short nTalam) : m_nTalam(nTalam)
33  {
34  }
35  /// Returns the Talam value
36  inline operator unsigned short() const { return m_nTalam; }
37 
38  /// Populates the standard Talam Macro defintions into Music String Dictionary
39  inline static void PopulateStandardDefinitions(DICTIONARY& stdDefns)
40  {
41  stdDefns[_T("trishra_Dhruva")] = _T("11");
42  stdDefns[_T("trishra_maThya")] = _T("8");
43  stdDefns[_T("trishra_rUpaka")] = _T("5");
44  stdDefns[_T("trishra_jhaMpe")] = _T("6");
45  stdDefns[_T("trishra_tripuTa")] = _T("7");
46  stdDefns[_T("trishra_ATa")] = _T("10");
47  stdDefns[_T("trishra_Eka")] = _T("3");
48 
49  stdDefns[_T("chaturashra_Dhruva")] = _T("14");
50  stdDefns[_T("chaturashra_maThya")] = _T("10");
51  stdDefns[_T("chaturashra_rUpaka")] = _T("6");
52  stdDefns[_T("chaturashra_jhaMpe")] = _T("7");
53  stdDefns[_T("chaturashra_tripuTa")] = _T("8");
54  stdDefns[_T("chaturashra_ATa")] = _T("12");
55  stdDefns[_T("chaturashra_Eka")] = _T("4");
56 
57  stdDefns[_T("kaMDa_Dhruva")] = _T("17");
58  stdDefns[_T("kaMDa_maThya")] = _T("12");
59  stdDefns[_T("kaMDa_rUpaka")] = _T("7");
60  stdDefns[_T("kaMDa_jhaMpe")] = _T("8");
61  stdDefns[_T("kaMDa_tripuTa")] = _T("9");
62  stdDefns[_T("kaMDa_ATa")] = _T("14");
63  stdDefns[_T("kaMDa_Eka")] = _T("5");
64 
65  stdDefns[_T("mishra_Dhruva")] = _T("23");
66  stdDefns[_T("mishra_maThya")] = _T("16");
67  stdDefns[_T("mishra_rUpaka")] = _T("9");
68  stdDefns[_T("mishra_jhaMpe")] = _T("10");
69  stdDefns[_T("mishra_tripuTa")] = _T("11");
70  stdDefns[_T("mishra_ATa")] = _T("18");
71  stdDefns[_T("mishra_Eka")] = _T("7");
72 
73  stdDefns[_T("saMkeerNa_Dhruva")] = _T("29");
74  stdDefns[_T("saMkeerNa_maThya")] = _T("20");
75  stdDefns[_T("saMkeerNa_rUpaka")] = _T("11");
76  stdDefns[_T("saMkeerNa_jhaMpe")] = _T("12");
77  stdDefns[_T("saMkeerNa_tripuTa")] = _T("13");
78  stdDefns[_T("saMkeerNa_ATa")] = _T("22");
79  stdDefns[_T("saMkeerNa_Eka")] = _T("9");
80 
81  stdDefns[_T("Dhruva")] = _T("14");
82  stdDefns[_T("maThya")] = _T("10");
83  stdDefns[_T("rUpaka")] = _T("6");
84  stdDefns[_T("jhaMpe")] = _T("7");
85  stdDefns[_T("tripuTa")] = _T("8");
86  stdDefns[_T("ATa")] = _T("12");
87  stdDefns[_T("Eka")] = _T("4");
88 
89  stdDefns[_T("ADi")] = _T("8");
90 
91  // Infer the Talam based on the Markers present in the Music String
92  stdDefns[_T("TALAM_UNKNOWN")] = _T("0");
93  stdDefns[_T("TALAM_INFER")] = _T("0");
94  stdDefns[_T("TALAM_USE_MARKERS")] = _T("0");
95  }
96 
97  }; // class Talam
98 
99 } // namespace CFugue
100 
101 #endif // _TALAM_H__D487B423_41C7_4ec5_BA4F_EB0D375C7425__
Defaults to Adi Talam.
Definition: Talam.h:27
std::map< MString, MString, StringLess< const TCHAR * > > DICTIONARY
Definition: Dictionary.h:37
static void PopulateStandardDefinitions(DICTIONARY &stdDefns)
Populates the standard Talam Macro defintions into Music String Dictionary.
Definition: Talam.h:39
Declares Dictionary type used by the Parsers.
Class representing Carnatic Music Talam
Definition: Talam.h:21

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