Search in sources :

Example 1 with MxlStartStopDiscontinue

use of com.xenoage.zong.musicxml.types.enums.MxlStartStopDiscontinue in project Zong by Xenoage.

the class VoltaReader method readToContext.

public void readToContext(Context context) {
    MxlStartStopDiscontinue type = mxlEnding.getType();
    if (type == MxlStartStopDiscontinue.Start) {
        Range range = readEndingRange(mxlEnding.getNumber());
        context.openVolta(range, null);
    } else if (type == MxlStartStopDiscontinue.Stop || type == MxlStartStopDiscontinue.Discontinue) {
        boolean rightHook = (type == MxlStartStopDiscontinue.Stop);
        ClosedVolta closedVolta = context.closeVolta(rightHook);
        if (closedVolta != null)
            context.writeColumnElement(closedVolta.volta, closedVolta.measure);
    }
}
Also used : ClosedVolta(com.xenoage.zong.io.musicxml.in.util.ClosedVolta) MxlStartStopDiscontinue(com.xenoage.zong.musicxml.types.enums.MxlStartStopDiscontinue) Range(com.xenoage.utils.kernel.Range)

Example 2 with MxlStartStopDiscontinue

use of com.xenoage.zong.musicxml.types.enums.MxlStartStopDiscontinue in project Zong by Xenoage.

the class MxlEnding method read.

@NonNull
public static MxlEnding read(XmlReader reader) {
    String number = reader.getAttributeNotNull("number");
    MxlStartStopDiscontinue type = MxlStartStopDiscontinue.read(reader.getAttributeNotNull("type"));
    return new MxlEnding(number, type);
}
Also used : MxlStartStopDiscontinue(com.xenoage.zong.musicxml.types.enums.MxlStartStopDiscontinue) NonNull(com.xenoage.utils.annotations.NonNull)

Aggregations

MxlStartStopDiscontinue (com.xenoage.zong.musicxml.types.enums.MxlStartStopDiscontinue)2 NonNull (com.xenoage.utils.annotations.NonNull)1 Range (com.xenoage.utils.kernel.Range)1 ClosedVolta (com.xenoage.zong.io.musicxml.in.util.ClosedVolta)1