MUSX Document Model
Loading...
Searching...
No Matches
musx::dom::others::ArticulationDef Class Reference

Stores the properties and behaviors of articulation definitions. More...

#include <Others.h>

+ Inheritance diagram for musx::dom::others::ArticulationDef:

Public Types

enum class  AutoVerticalMode {
  AlwaysNoteheadSide , AutoNoteStem , StemSide , AlwaysOnStem ,
  AboveEntry , BelowEntry
}
 Defines the automatic vertical positioning mode. These values are only meaningful if autoVert is true. Otherwise autoVertMode has the default value but it means "Manual". More...
 
enum class  CopyMode { None , Vertical , Horizontal }
 Defines the character copy mode (vertical or horizontal) More...
 
enum class  SlurInteractionMode { Ignore , InsideSlur , AvoidSlur }
 Defines the interaction mode with slurs. More...
 
- Public Types inherited from musx::dom::Base
enum class  ShareMode { All , Partial , None }
 Describes how this instance is shared between part and score. More...
 
using SharedNodes = std::set< std::string >
 The container type for shared nodes.
 

Public Member Functions

 ArticulationDef (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper)
 Constructor.
 
bool requireAllFields () const override
 
- Public Member Functions inherited from musx::dom::OthersBase
Cmper getCmper () const
 Gets the cmper key value.
 
std::optional< IncigetInci () const
 Gets the optional array index (inci).
 
- Public Member Functions inherited from musx::dom::Base
virtual ~Base () noexcept(false)=default
 Virtual destructor for polymorphic behavior.
 
DocumentPtr getDocument () const
 Gets a reference to the Document.
 
Cmper getPartId () const
 Gets the partId for this instance (or 0 for score)
 
std::shared_ptr< others::PartDefinitiongetPartDefinition () const
 Gets the others::PartDefinition corresponding to getPartId.
 
ShareMode getShareMode () const
 Gets the sharing mode for this instance.
 
const SharedNodesgetUnlinkedNodes () const
 Gets the unlinked nodes for this instance. (Only populated for ShareMode::Partial)
 
void addUnlinkedNode (const std::string &nodeName)
 Adds a shared node for this instance.
 
virtual void integrityCheck ()
 Allows a class to determine if it has been properly contructed by the factory and fix issues that it can, such as creating default instances of contained classes.
 

Static Public Member Functions

static const xml::XmlElementArray< ArticulationDef > & xmlMappingArray ()
 Required for musx::factory::FieldPopulator.
 

Public Attributes

char32_t charMain {}
 Main symbol character (utf32).
 
std::shared_ptr< FontInfofontMain
 The font info for the main symbol. (xml nodes <fontMain>, <sizeMain>, and <efxMain>)
 
CopyMode copyMode {}
 "Copy Main Symbol" option.
 
bool autoHorz {}
 Whether horizontal auto-positioning is enabled.
 
bool autoVert {}
 Whether vertical auto-positioning is enabled.
 
AutoVerticalMode autoVertMode {}
 Auto vertical positioning mode.
 
bool aboveSymbolAlt {}
 Whether the alternate symbol is used above. (Otherwise main symbol is used.)
 
bool belowSymbolAlt {}
 Whether the alternate symbol is used below. (Otherwise main symbol is used.)
 
bool insideSlur {}
 Whether the articulation is inside a slur. (Used in addition to SlurInteractionMode::InsideSlur)
 
bool autoStack {}
 Whether automatic stacking is enabled.
 
bool centerOnStem {}
 Whether centering on the stem is enabled.
 
SlurInteractionMode slurInteractionMode {}
 Slur interaction mode.
 
char32_t charAlt {}
 Alternate symbol character (utf32).
 
std::shared_ptr< FontInfofontAlt
 The font info for the alternate symbol. (xml nodes <fontAlt>, <sizeAlt>, and <efxAlt>)
 
Evpu xOffsetMain {}
 Horizontal offset for the main symbol.
 
Evpu yOffsetMain {}
 Vertical offset for the main symbol.
 
Evpu defVertPos {}
 Default vertical position.
 
bool avoidStaffLines {}
 Whether to avoid staff lines.
 
bool playArtic {}
 Whether playback articulation is enabled.
 
Evpu xOffsetAlt {}
 Horizontal offset for the alternate symbol.
 
Evpu yOffsetAlt {}
 Vertical offset for the alternate symbol.
 
bool mainIsShape {}
 Whether the main symbol is a shape.
 
bool altIsShape {}
 Whether the alternate symbol is a shape.
 
Cmper mainShape {}
 Main shape ID (if applicable).
 
Cmper altShape {}
 Alternate shape ID (if applicable).
 
int startTopNoteDelta {}
 Attack change for the top note.
 
int startBotNoteDelta {}
 Attack change for the bottom note.
 
int startTopNotePercent {}
 Attack change percent for the top note.
 
int startBotNotePercent {}
 Attack change percent for the bottom note.
 
int durTopNoteDelta {}
 Duration change for the top note.
 
int durBotNoteDelta {}
 Duration change for the bottom note.
 
int durTopNotePercent {}
 Duration percent change for the top note.
 
int durBotNotePercent {}
 Duration percent change for the bottom note.
 
int ampTopNoteDelta {}
 Key velocity change for the top note.
 
int ampBotNoteDelta {}
 Key velocity change for the bottom note.
 
int ampTopNotePercent {}
 Key velocity percentage for the top note.
 
int ampBotNotePercent {}
 Key velocity percentage for the bottom note.
 
bool outsideStaff {}
 Whether the articulation is outside the staff.
 

Static Public Attributes

static constexpr std::string_view XmlNodeName = "articDef"
 The XML node name for this type.
 

Additional Inherited Members

- Protected Member Functions inherited from musx::dom::OthersBase
 OthersBase (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper, std::optional< Inci > inci=std::nullopt)
 Constructs an OthersBase object.
 
- Protected Member Functions inherited from musx::dom::Base
 Base (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode)
 Constructs the base class and enforces the static constexpr XmlNodeName.
 
Baseoperator= (const Base &)
 assignment constructor: m_unlinkedNodes is intentionally omitted
 

Detailed Description

Stores the properties and behaviors of articulation definitions.

The playback "delta" and "percent" values are alternatives. For each type of playback modification, one or the other is used. The other is zero.

This class is identified by the XML node name "articDef".

Member Enumeration Documentation

◆ AutoVerticalMode

Defines the automatic vertical positioning mode. These values are only meaningful if autoVert is true. Otherwise autoVertMode has the default value but it means "Manual".

Enumerator
AlwaysNoteheadSide 

default value (may not appear in xml)

AutoNoteStem 

"Auto Notehead/Stem Side"

StemSide 

"Always Stem Side"

AlwaysOnStem 

"On Stem"

AboveEntry 

"Above Note"

BelowEntry 

"Below Note"

◆ CopyMode

Defines the character copy mode (vertical or horizontal)

Enumerator
None 

default value (may not appear in xml)

Vertical 

Copy symbol vertically (xml value is "both")

Horizontal 

Copy symbol horizontally.

◆ SlurInteractionMode

Defines the interaction mode with slurs.

Enumerator
Ignore 

default value (may not appear in xml)

Constructor & Destructor Documentation

◆ ArticulationDef()

musx::dom::others::ArticulationDef::ArticulationDef ( const DocumentWeakPtr document,
Cmper  partId,
ShareMode  shareMode,
Cmper  cmper 
)
inlineexplicit

Constructor.

Initializes all fields to their default values.

Member Function Documentation

◆ requireAllFields()

bool musx::dom::others::ArticulationDef::requireAllFields ( ) const
inlineoverridevirtual
Todo:
: remove this override after identifying all fields.

Reimplemented from musx::dom::Base.