GUIDOLib  1.7.7
Guido Engine Internal Documentation
ARInstrument.h
1 #ifndef ARInstrument_H
2 #define ARInstrument_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 <string>
19 
20 #include "ARFontAble.h"
21 
22 
23 /*@mkdoc
24 
25 @group:Text
26 
27 @tagname:\instrument
28 @tagalias:\instr
29 @tagtype:P
30 @tagnotation:instrument marking
31 @tagdesc
32 @tagend
33 
34 @params:
35 @param:name:string:the instrument name:*none*:false
36 @param:transp:string:a transposition string:*none*:true
37 @param:autopos:boolean:automatic position control:off:true
38 @fontparams:
39 @paramdesc
40 - **name** is the instrument name (e.g. "Violin I")
41 - **transp** is provided for transposing instruments. For example, with a Trumpet in B flat, you should set **transp** to "B&". When *transp* is set, a transposing key is automatically inserted and the notes are automatically transposed to the corresponding interval.
42 - **autopos**: when "on", put the instrument string centered to the left of the corresponding staff. The default position if on top, left of the staff.
43 
44 See the [Articulations](@EXAMPLES/articulations/) example.<br />
45 See the [Mozart](@EXAMPLES/mozart581/) example.<br />
46 See the [Fauré](@EXAMPLES/faure/) example.
47 @paramend
48 
49 */
50 
53 class ARInstrument : public ARFontAble
54 {
55  public:
56  ARInstrument(bool autopos);
57  virtual ~ARInstrument() {}
58 
59  virtual void setTagParameters (const TagParameterMap& params);
60 
61  virtual int getOrder() const { return kInstrumentOrder; }
62  virtual const char* getParamsStr() const { return kARInstrumentParams; };
63  virtual const char* getTagName() const { return "ARInstrument"; };
64  virtual std::string getGMNName() const { return "\\instrument"; };
65  virtual bool IsStateTag() const { return true; }
66 
67  const std::string& getName() const { return fName; }
68  const std::string& getTransp() const { return fTransp; }
69  bool autoPos() const { return fAutoPos; }
70 
71  private:
72  std::string fName;
73  std::string fTransp;
74  bool fAutoPos;
75 };
76 
77 #endif
ARInstrument
not yet documented
Definition: ARInstrument.h:53
ARMusicalTag::kInstrumentOrder
Definition: ARMusicalTag.h:40
ARInstrument::~ARInstrument
virtual ~ARInstrument()
Definition: ARInstrument.h:57
ARFontAble
Definition: ARFontAble.h:21
ARInstrument::getTagName
virtual const char * getTagName() const
Definition: ARInstrument.h:63
ARInstrument::getParamsStr
virtual const char * getParamsStr() const
Definition: ARInstrument.h:62
ARInstrument::getTransp
const std::string & getTransp() const
Definition: ARInstrument.h:68
ARInstrument::setTagParameters
virtual void setTagParameters(const TagParameterMap &params)
ARInstrument::getName
const std::string & getName() const
Definition: ARInstrument.h:67
ARInstrument::ARInstrument
ARInstrument(bool autopos)
ARInstrument::getGMNName
virtual std::string getGMNName() const
Definition: ARInstrument.h:64
ARInstrument::IsStateTag
virtual bool IsStateTag() const
Definition: ARInstrument.h:65
ARInstrument::getOrder
virtual int getOrder() const
Definition: ARInstrument.h:61
ARInstrument::autoPos
bool autoPos() const
Definition: ARInstrument.h:69
TagParameterMap
A list of tag parameters represented as a map.
Definition: TagParameterMap.h:31

Guido Project Copyright © 2019 Grame-CNCM