GUIDOLib  1.7.7
Guido Engine Internal Documentation
ARLyrics.h
1 #ifndef ARLyrics_H
2 #define ARLyrics_H
3 
4 /*
5  GUIDO Library
6  Copyright (C) 2002 Holger Hoos, Juergen Kilian, Kai Renz
7  Copyright (C) 2002-2017 Grame
8 
9  This Source Code Form is subject to the terms of the Mozilla Public
10  License, v. 2.0. If a copy of the MPL was not distributed with this
11  file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 
13  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
14  research@grame.fr
15 
16 */
17 
18 #include "ARPositionTag.h"
19 #include "ARFontAble.h"
20 
21 class ARText;
22 
23 /*@mkdoc
24 
25 @group:Text
26 
27 @tagname:\lyrics
28 @tagalias:
29 @tagtype:R
30 @tagnotation:lyrics
31 @tagdesc
32 @tagend
33 
34 @params:
35 @param:text:string:the lyrics:*none*:false
36 @param:autopos:string::off:true
37 @fontparams:
38 @paramdesc
39 The lyrics are mapped onto the enclosed notes and rests according to the following rules:
40 
41 - a " " (space) after a word (or syllable) progresses to the following event.
42 - a "~" (tilde) between characters specifies a blank within the lyrics. There is no progression to the following event. The tilde is used to place more than one word on a single note.
43 - a "-" (hyphen) progresses to the following event. The hyphen is also printed in the score.
44 - a "_" (underscore) progresses to the following event. The underscore is also printed in the score.
45 - a "<n>" progresses to the event that is marked with the \mark<n>-tag. If the <n> is proceeded by a hyphen ("-"), a series of hyphens is printed from the current event to the target event.
46 
47 When **autopos** is on, the system moves the lyrics in case of collision.
48 
49 See the [Faure](@EXAMPLES/faure/) example.
50 @paramend
51 
52 */
53 
56 class ARLyrics : public ARFontAble, public ARPositionTag
57 {
58  public:
59 
60  friend class ARText;
61 
62  ARLyrics(bool autopos=false);
63  virtual ~ARLyrics() {}
64 
65  virtual void setTagParameters (const TagParameterMap& params);
66 
67  virtual const char* getText() const { return fText.c_str(); }
68  virtual const char* getParamsStr() const { return kARLyricsParams; };
69  virtual const char* getTagName() const { return "ARLyrics"; };
70  virtual std::string getGMNName() const { return "\\lyrics"; };
71  bool autoPos() const { return fAutoPos; }
72 
73  protected:
74  std::string fText; // the corresponding text ...
75  bool fAutoPos;
76 };
77 
78 #endif
ARLyrics::setTagParameters
virtual void setTagParameters(const TagParameterMap &params)
ARLyrics::getParamsStr
virtual const char * getParamsStr() const
Definition: ARLyrics.h:68
ARFontAble
Definition: ARFontAble.h:21
ARLyrics::autoPos
bool autoPos() const
Definition: ARLyrics.h:71
ARLyrics::~ARLyrics
virtual ~ARLyrics()
Definition: ARLyrics.h:63
ARLyrics::getText
virtual const char * getText() const
Definition: ARLyrics.h:67
ARLyrics::fAutoPos
bool fAutoPos
Definition: ARLyrics.h:75
ARLyrics::getTagName
virtual const char * getTagName() const
Definition: ARLyrics.h:69
ARLyrics
Implement the lyrics Tag.
Definition: ARLyrics.h:56
ARLyrics::ARLyrics
ARLyrics(bool autopos=false)
ARPositionTag
The base class for all range tags.
Definition: ARPositionTag.h:26
TagParameterMap
A list of tag parameters represented as a map.
Definition: TagParameterMap.h:31
ARLyrics::fText
std::string fText
Definition: ARLyrics.h:74
ARText
The text tag.
Definition: ARText.h:49
ARLyrics::getGMNName
virtual std::string getGMNName() const
Definition: ARLyrics.h:70

Guido Project Copyright © 2019 Grame-CNCM