1 /* 2 MusicXML Library 3 Copyright (C) Grame 2006-2013 4 5 This Source Code Form is subject to the terms of the Mozilla Public 6 License, v. 2.0. If a copy of the MPL was not distributed with this 7 file, You can obtain one at http://mozilla.org/MPL/2.0/. 8 9 Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France 10 research@grame.fr 11 */ 12 13 #ifndef ___lpsrBasicTypes___ 14 #define ___lpsrBasicTypes___ 15 16 #include <list> 17 #include <map> 18 19 #include "smartpointer.h" 20 21 #include "rational.h" 22 23 #include "msrBasicTypes.h" 24 25 26 namespace MusicXML2 27 { 28 29 // score output kinds 30 //______________________________________________________________________________ 31 enum lpsrScoreOutputKind { 32 kScoreOnly, // default value 33 kScoreAndParts, 34 kPartsAndScore, 35 kPartsOnly, 36 kScoreAndPartsOneFile, 37 kPartsAndScoreOneFile, 38 kPartsOnlyOneFile }; 39 40 string lpsrScoreOutputKindAsString ( 41 lpsrScoreOutputKind scoreOutputKind); 42 43 extern map<string, lpsrScoreOutputKind> 44 gLpsrScoreOutputKindsMap; 45 46 string existingLpsrScoreOutputKinds (int namesListMaxLength); 47 48 void initializeLpsrScoreOutputKindsMap (); 49 50 // octave entry 51 //______________________________________________________________________________ 52 enum lpsrOctaveEntryKind { 53 kOctaveEntryRelative, // default value 54 kOctaveEntryAbsolute, 55 kOctaveEntryFixed }; 56 57 string lpsrOctaveEntryKindAsString ( 58 lpsrOctaveEntryKind octaveEntryKind); 59 60 extern map<string, lpsrOctaveEntryKind> 61 gLpsrOctaveEntryKindsMap; 62 63 string existingLpsrOctaveEntryKinds (int namesListMaxLength); 64 65 void initializeLpsrOctaveEntryKindsMap (); 66 67 // accidental styles 68 //______________________________________________________________________________ 69 enum lpsrAccidentalStyleKind { 70 kDefault, 71 kVoice, 72 kModern, 73 kModernCautionary, kModernVoice, kModernVoiceCautionary, 74 kPiano, kPianoCautionary, 75 kNeoModern, 76 kNeoModernCautionary, kNeoModernVoice, kNeoModernVoiceCautionary, 77 kDodecaphonic, kDodecaphonicNoRepeat, 78 kDodecaphonicFirst, kTeaching, kNoReset, kForget }; 79 80 string lpsrAccidentalStyleKindAsString ( 81 lpsrAccidentalStyleKind accidentalStyleKind); 82 83 string lpsrAccidentalStyleKindAsLilypondString ( 84 lpsrAccidentalStyleKind accidentalStyleKind); 85 86 extern map<string, lpsrAccidentalStyleKind> 87 gLpsrAccidentalStyleKindsMap; 88 89 string existingLpsrAccidentalStyleKinds (int namesListMaxLength); 90 91 void initializeLpsrAccidentalStyleKindsMap (); 92 93 // chords languages 94 //______________________________________________________________________________ 95 enum lpsrChordsLanguageKind { 96 k_IgnatzekChords, // LilyPond default 97 k_GermanChords, k_SemiGermanChords, k_ItalianChords, k_FrenchChords }; 98 99 string lpsrChordsLanguageKindAsString ( 100 lpsrChordsLanguageKind languageKind); 101 102 extern map<string, lpsrChordsLanguageKind> 103 gLpsrChordsLanguageKindsMap; 104 105 string existingLpsrChordsLanguageKinds (int namesListMaxLength); 106 107 void initializeLpsrChordsLanguageKindsMap (); 108 109 // whole notes 110 //______________________________________________________________________________ 111 string wholeNotesAsLilypondString ( 112 int inputLineNumber, 113 rational wholeNotes, 114 int& dotsNumber); 115 116 string wholeNotesAsLilypondString ( 117 int inputLineNumber, 118 rational wholeNotes); 119 120 // dotted durations 121 //______________________________________________________________________________ 122 123 string dottedDurationAsLilypondString ( 124 int inputLineNumber, 125 msrDottedDuration dottedDuration); 126 127 string dottedDurationAsLilypondStringWithoutBackSlash ( 128 int inputLineNumber, 129 msrDottedDuration dottedDuration); 130 131 // rests measures 132 //______________________________________________________________________________ 133 string restMeasuresWholeNoteAsLilypondString ( 134 int inputLineNumber, 135 rational wholeNotes); 136 137 // texts lists 138 //______________________________________________________________________________ 139 void writeTextsListAsLilypondString ( 140 const list<string>& textsList, 141 ostream& os); 142 143 // pitches and octaves 144 //______________________________________________________________________________ 145 string msrSemiTonesPitchKindAsLilypondString ( 146 msrQuarterTonesPitchesLanguageKind languageKind, 147 msrSemiTonesPitchKind semiTonesPitchKind); 148 149 string msrSemiTonesPitchAndOctaveAsLilypondString ( 150 msrQuarterTonesPitchesLanguageKind languageKind, 151 S_msrSemiTonesPitchAndOctave quarterTonesPitchAndOctave); 152 153 // lyrics durations 154 //______________________________________________________________________________ 155 enum lpsrLyricsDurationsKind { 156 kLyricsDurationsImplicit, // default value 157 kLyricsDurationsExplicit }; 158 159 string lpsrLyricsDurationsKindAsString ( 160 lpsrLyricsDurationsKind lyricsDurationsKind); 161 162 extern map<string, lpsrLyricsDurationsKind> 163 gLpsrLyricsDurationsKindsMap; 164 165 string existingLpsrLyricsDurationsKinds (int namesListMaxLength); 166 167 void initializeLpsrLyricsDurationsKindsMap (); 168 169 // initialization 170 //______________________________________________________________________________ 171 void initializeLPSRBasicTypes (); 172 173 174 } // namespace MusicXML2 175 176 177 #endif 178