Planeshift
MusicXMLElement Class Reference

Extends the class MeasureElement by adding the ability to parse MusicXML. More...

#include <musicxmlscore.h>

Public Member Functions

bool LoadXMLNote (const csRef< iDocumentNode > &noteNode, int divisions)
 Load a note from the given <note> node. More...
 
csString ToXML ()
 Convert the note to XML. More...
 
- Public Member Functions inherited from MeasureElement
bool AddNote (char name, int octave, psMusic::Accidental writtenAccidental)
 Copy a note into the chord. More...
 
psMusic::Duration GetDuration ()
 Get the duration of this element. More...
 
size_t GetNNotes () const
 Get the number of notes in this chord. More...
 
NoteGetNote (size_t n)
 Return the n-th note in the element. More...
 
const NoteGetNote (size_t n) const
 
bool IsRest () const
 Return whether this element is a rest or not. More...
 
 MeasureElement (psMusic::Duration duration)
 Constructor. More...
 
bool RemoveNote (char name, int octave)
 Delete a note with the same name and octave. More...
 
void SetDuration (psMusic::Duration duration)
 Set the duration of this element. More...
 
void SetRest ()
 Set this element to be a rest. More...
 

Detailed Description

Extends the class MeasureElement by adding the ability to parse MusicXML.

Definition at line 48 of file musicxmlscore.h.

Member Function Documentation

bool MusicXMLElement::LoadXMLNote ( const csRef< iDocumentNode > &  noteNode,
int  divisions 
)

Load a note from the given <note> node.

If this element contain already one or more note, only notes that present the <chord/> tag are accepted.

Parameters
noteNodea reference to the <note> node containing the definition of the note in MusicXML syntax.
divisionsdivisions per quarter used by the score to indicate duration.
Returns
false if the given node syntax is wrong or if this note is not part of this chord, true otherwise.
csString MusicXMLElement::ToXML ( )

Convert the note to XML.

Returns
the string containing the note definition in MusicXML syntax.

The documentation for this class was generated from the following file: