use of com.xenoage.zong.musicxml.types.choice.MxlLyricContent.MxlLyricContentType in project Zong by Xenoage.
the class LyricReader method readLyrics.
private List<Lyric> readLyrics() {
// not supported yet: in MusicXML also rests can have lyrics. see measure 36 in Echigo-Jishi
List<Lyric> ret = alist();
for (MxlNote mxlNote : mxlNotes) {
for (MxlLyric mxlLyric : it(mxlNote.getLyrics())) {
int verse = readVerse(mxlLyric);
MxlLyricContentType mxlLCType = mxlLyric.getContent().getLyricContentType();
if (mxlLCType == MxlLyricContentType.SyllabicText) {
MxlSyllabicText mxlSyllabicText = (MxlSyllabicText) mxlLyric.getContent();
SyllableType syllableType = readSyllableType(mxlLyric);
// the next element must be the text element
ret.add(new Lyric(Companion.ut(mxlSyllabicText.getText().getValue()), syllableType, verse));
} else if (mxlLCType == MxlLyricContentType.Extend) {
// extend - TODO: extension to next chord!
ret.add(Lyric.Companion.lyricExtend(verse));
}
}
}
return ret;
}
Aggregations