use of com.xenoage.zong.musicxml.types.choice.MxlFullNoteContent in project Zong by Xenoage.
the class ChordReader method addChordNote.
/**
* Reads the given note element, which is part of
* a chord (but not the first note element of the chord), and adds it to the given chord.
* Also the notations of this note are read.
*/
private static void addChordNote(Context context, MxlNote mxlNote, Chord chord, int staffIndexInPart) {
// only pitch is interesting for us, since we do not allow
// different durations for notes within a chord or other strange stuff
MxlFullNoteContent mxlFNC = mxlNote.getContent().getFullNote().getContent();
if (mxlFNC.getFullNoteContentType() == MxlFullNoteContentType.Pitch) {
Pitch pitch = ((MxlPitch) mxlFNC).getPitch();
Note note = new Note(pitch);
chord.addNote(note);
// notations
if (mxlNote.getNotations() != null) {
new NotationsReader(mxlNote.getNotations()).readToNote(chord, chord.getNotes().indexOf(note), staffIndexInPart, context);
}
}
}
Aggregations