Search in sources :

Example 1 with ClosedVolta

use of com.xenoage.zong.io.musicxml.in.util.ClosedVolta 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)

Aggregations

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