LibMusicXML 3.18
lpsrBasicTypes.h
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
26namespace MusicXML2
27{
28
29// score output kinds
30//______________________________________________________________________________
31enum lpsrScoreOutputKind {
32 kScoreOnly, // default value
33 kScoreAndParts,
34 kPartsAndScore,
35 kPartsOnly,
36 kScoreAndPartsOneFile,
37 kPartsAndScoreOneFile,
38 kPartsOnlyOneFile };
39
40string lpsrScoreOutputKindAsString (
41 lpsrScoreOutputKind scoreOutputKind);
42
43extern map<string, lpsrScoreOutputKind>
44 gLpsrScoreOutputKindsMap;
45
46string existingLpsrScoreOutputKinds (int namesListMaxLength);
47
48void initializeLpsrScoreOutputKindsMap ();
49
50// octave entry
51//______________________________________________________________________________
52enum lpsrOctaveEntryKind {
53 kOctaveEntryRelative, // default value
54 kOctaveEntryAbsolute,
55 kOctaveEntryFixed };
56
57string lpsrOctaveEntryKindAsString (
58 lpsrOctaveEntryKind octaveEntryKind);
59
60extern map<string, lpsrOctaveEntryKind>
61 gLpsrOctaveEntryKindsMap;
62
63string existingLpsrOctaveEntryKinds (int namesListMaxLength);
64
65void initializeLpsrOctaveEntryKindsMap ();
66
67// accidental styles
68//______________________________________________________________________________
69enum 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
80string lpsrAccidentalStyleKindAsString (
81 lpsrAccidentalStyleKind accidentalStyleKind);
82
83string lpsrAccidentalStyleKindAsLilypondString (
84 lpsrAccidentalStyleKind accidentalStyleKind);
85
86extern map<string, lpsrAccidentalStyleKind>
87 gLpsrAccidentalStyleKindsMap;
88
89string existingLpsrAccidentalStyleKinds (int namesListMaxLength);
90
91void initializeLpsrAccidentalStyleKindsMap ();
92
93// chords languages
94//______________________________________________________________________________
95enum lpsrChordsLanguageKind {
96 k_IgnatzekChords, // LilyPond default
97 k_GermanChords, k_SemiGermanChords, k_ItalianChords, k_FrenchChords };
98
99string lpsrChordsLanguageKindAsString (
100 lpsrChordsLanguageKind languageKind);
101
102extern map<string, lpsrChordsLanguageKind>
103 gLpsrChordsLanguageKindsMap;
104
105string existingLpsrChordsLanguageKinds (int namesListMaxLength);
106
107void initializeLpsrChordsLanguageKindsMap ();
108
109// whole notes
110//______________________________________________________________________________
111string wholeNotesAsLilypondString (
112 int inputLineNumber,
113 rational wholeNotes,
114 int& dotsNumber);
115
116string wholeNotesAsLilypondString (
117 int inputLineNumber,
118 rational wholeNotes);
119
120// dotted durations
121//______________________________________________________________________________
122
123string dottedDurationAsLilypondString (
124 int inputLineNumber,
125 msrDottedDuration dottedDuration);
126
127string dottedDurationAsLilypondStringWithoutBackSlash (
128 int inputLineNumber,
129 msrDottedDuration dottedDuration);
130
131// rests measures
132//______________________________________________________________________________
133string restMeasuresWholeNoteAsLilypondString (
134 int inputLineNumber,
135 rational wholeNotes);
136
137// texts lists
138//______________________________________________________________________________
139void writeTextsListAsLilypondString (
140 const list<string>& textsList,
141 ostream& os);
142
143// pitches and octaves
144//______________________________________________________________________________
145string msrSemiTonesPitchKindAsLilypondString (
146 msrQuarterTonesPitchesLanguageKind languageKind,
147 msrSemiTonesPitchKind semiTonesPitchKind);
148
149string msrSemiTonesPitchAndOctaveAsLilypondString (
150 msrQuarterTonesPitchesLanguageKind languageKind,
151 S_msrSemiTonesPitchAndOctave quarterTonesPitchAndOctave);
152
153// lyrics durations
154//______________________________________________________________________________
155enum lpsrLyricsDurationsKind {
156 kLyricsDurationsImplicit, // default value
157 kLyricsDurationsExplicit };
158
159string lpsrLyricsDurationsKindAsString (
160 lpsrLyricsDurationsKind lyricsDurationsKind);
161
162extern map<string, lpsrLyricsDurationsKind>
163 gLpsrLyricsDurationsKindsMap;
164
165string existingLpsrLyricsDurationsKinds (int namesListMaxLength);
166
167void initializeLpsrLyricsDurationsKindsMap ();
168
169// initialization
170//______________________________________________________________________________
171void initializeLPSRBasicTypes ();
172
173
174} // namespace MusicXML2
175
176
177#endif
Rational number representation.
Definition: rational.h:25