Planeshift
|
Extends the class MeasureElement by adding the ability to parse MusicXML. More...
#include <musicxmlscore.h>
Public Member Functions | |
bool | LoadXMLNote (const csRef< iDocumentNode > ¬eNode, int divisions) |
Load a note from the given <note> node. More... | |
csString | ToXML () |
Convert the note to XML. More... | |
![]() | |
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... | |
Note & | GetNote (size_t n) |
Return the n-th note in the element. More... | |
const Note & | GetNote (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... | |
Extends the class MeasureElement by adding the ability to parse MusicXML.
Definition at line 48 of file musicxmlscore.h.
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.
noteNode | a reference to the <note> node containing the definition of the note in MusicXML syntax. |
divisions | divisions per quarter used by the score to indicate duration. |
csString MusicXMLElement::ToXML | ( | ) |
Convert the note to XML.