8 #ifndef __VRV_CUSTOMTUNING_H__
9 #define __VRV_CUSTOMTUNING_H__
31 CustomTuning(
const std::string &tuningDef,
Doc *doc,
bool useMusicXmlAccidentals);
37 bool IsValid()
const {
return m_tuning.notationMapping.count > 0; }
38 Tunings::Tuning &GetTuning() {
return m_tuning; }
39 const Tunings::Tuning &GetTuning()
const {
return m_tuning; }
40 std::map<std::string, std::string> &GetNoteMap() {
return m_noteMap; }
41 const std::map<std::string, std::string> &GetNoteMap()
const {
return m_noteMap; }
48 int GetMIDIPitch(
const Note *note,
const int shift,
const int octaveShift)
const;
55 static char32_t GetGlyphCode(
const std::string &glyphName,
Doc *doc = NULL);
56 static std::string GetGlyphName(char32_t glyphCode,
Doc *doc = NULL);
57 static char32_t GetAccidGlyph(
const std::string &accid,
bool useMusicXmlAccidentals);
63 static void CopyCustomTunings(
const Doc *src,
Doc *dst);
70 static void CreateGlyphMapping(
Doc *doc);
71 void CreateNoteMapping(
bool useMusicXmlAccidentals);
78 Tunings::Tuning m_tuning;
79 std::map<std::string, std::string> m_noteMap;
85 static std::map<std::string, char32_t> s_glyphNames;
86 static std::map<char32_t, std::string> s_glyphCodes;
Definition: customtuning.h:28
This class is a hold the data and corresponds to the model of a MVC design pattern.
Definition: doc.h:41
This class models the MEI <note> element.
Definition: note.h:69