Search in sources :

Example 1 with SLP

use of com.xenoage.zong.musiclayout.SLP in project Zong by Xenoage.

the class BeamedStems method fromBeam.

public static BeamedStems fromBeam(List<ChordSpacing> beamChords) {
    val stems = new CList<BeamedStem>(beamChords.size());
    for (val chord : beamChords) {
        // we need a stem for each beamed chord
        if (chord.notation.stem == null)
            throw new IllegalStateException("TODO! we need a stem for each beamed chord");
        SLP stemSideNoteSlp = chord.getNotation().getStemSideNoteSlp();
        SLP stemEndSlp = chord.getNotation().getStemEndSlp();
        stems.add(new BeamedStem(chord.getStemXIs(), chord.notation.stemDirection, stemSideNoteSlp, stemEndSlp));
    }
    return new BeamedStems(stems.close());
}
Also used : lombok.val(lombok.val) CList(com.xenoage.utils.collections.CList) SLP(com.xenoage.zong.musiclayout.SLP)

Aggregations

CList (com.xenoage.utils.collections.CList)1 SLP (com.xenoage.zong.musiclayout.SLP)1 lombok.val (lombok.val)1