Search in sources :

Example 6 with Slur

use of com.xenoage.zong.core.music.slur.Slur in project Zong by Xenoage.

the class SlursTest method assertSlurBetween.

public static void assertSlurBetween(Chord[] chords, int chord1Index, int chord2Index, SlurType expectedSlurType) {
    Slur slur = getStartSlur(chords, chord1Index);
    assertEquals(expectedSlurType, slur.getType());
    List<SlurWaypoint> waypoints = slur.getWaypoints();
    assertEquals(2, waypoints.size());
    assertEquals(chords[chord1Index], waypoints.get(0).getChord());
    assertEquals(chords[chord2Index], waypoints.get(1).getChord());
}
Also used : Slur(com.xenoage.zong.core.music.slur.Slur) SlurWaypoint(com.xenoage.zong.core.music.slur.SlurWaypoint)

Aggregations

Slur (com.xenoage.zong.core.music.slur.Slur)6 SlurWaypoint (com.xenoage.zong.core.music.slur.SlurWaypoint)4 VSide (com.xenoage.utils.math.VSide)2 Chord (com.xenoage.zong.core.music.chord.Chord)2 SP (com.xenoage.zong.core.music.format.SP)2 Test (org.junit.Test)2 Score (com.xenoage.zong.core.Score)1 WaypointPosition (com.xenoage.zong.core.music.WaypointPosition)1 Beam (com.xenoage.zong.core.music.beam.Beam)1 BezierPoint (com.xenoage.zong.core.music.format.BezierPoint)1 Lyric (com.xenoage.zong.core.music.lyric.Lyric)1 SyllableType (com.xenoage.zong.core.music.lyric.SyllableType)1 Tuplet (com.xenoage.zong.core.music.tuplet.Tuplet)1 ContinuedSlur (com.xenoage.zong.musiclayout.continued.ContinuedSlur)1 ChordStampings (com.xenoage.zong.musiclayout.layouter.scoreframelayout.util.ChordStampings)1 SlurStamping (com.xenoage.zong.musiclayout.stampings.SlurStamping)1 lombok.val (lombok.val)1