Search in sources :

Example 61 with Chord

use of com.xenoage.zong.core.music.chord.Chord in project Zong by Xenoage.

the class Test61a method test.

@Test
public void test() {
    for (int iMeasure : range(3)) {
        for (int iElement : range(iMeasure == 2 ? 3 : 4)) {
            MP mp = MP.atElement(0, iMeasure, 0, iElement);
            Chord chord = ChordTest.getChordAt(score, mp);
            assertEqualsChordLyrics(expectedLyrics[iMeasure * 4 + iElement], chord, mp);
        }
    }
}
Also used : MP(com.xenoage.zong.core.position.MP) Chord(com.xenoage.zong.core.music.chord.Chord) ChordTest(musicxmltestsuite.tests.utils.ChordTest) Test(org.junit.Test)

Example 62 with Chord

use of com.xenoage.zong.core.music.chord.Chord in project Zong by Xenoage.

the class Test61b method test.

@Test
public void test() {
    for (int iMeasure : range(2)) {
        for (int iElement : range(4)) {
            MP mp = MP.atElement(0, iMeasure, 0, iElement);
            Chord chord = ChordTest.getChordAt(score, mp);
            assertEqualsChordLyrics(expectedLyrics[iMeasure * 4 + iElement], chord, mp);
        }
    }
}
Also used : MP(com.xenoage.zong.core.position.MP) Chord(com.xenoage.zong.core.music.chord.Chord) ChordTest(musicxmltestsuite.tests.utils.ChordTest) Test(org.junit.Test)

Example 63 with Chord

use of com.xenoage.zong.core.music.chord.Chord in project Zong by Xenoage.

the class Test61e method test.

@Test
public void test() {
    for (int iElement : range(4)) {
        MP mp = MP.atElement(0, 0, 0, iElement);
        Chord chord = ChordTest.getChordAt(score, mp);
        assertEquals(expectedChordNotesCount[iElement], chord.getNotes().size());
        assertEqualsChordLyrics(expectedLyrics[iElement], chord, mp);
    }
}
Also used : MP(com.xenoage.zong.core.position.MP) Chord(com.xenoage.zong.core.music.chord.Chord) ChordTest(musicxmltestsuite.tests.utils.ChordTest) Test(org.junit.Test)

Aggregations

Chord (com.xenoage.zong.core.music.chord.Chord)63 Test (org.junit.Test)34 MP (com.xenoage.zong.core.position.MP)16 Pitch (com.xenoage.zong.core.music.Pitch)12 Score (com.xenoage.zong.core.Score)11 Voice (com.xenoage.zong.core.music.Voice)10 NotesNotation (com.xenoage.zong.musiclayout.notation.chord.NotesNotation)10 VoiceElement (com.xenoage.zong.core.music.VoiceElement)8 Note (com.xenoage.zong.core.music.chord.Note)6 Rest (com.xenoage.zong.core.music.rest.Rest)6 ChordTest (musicxmltestsuite.tests.utils.ChordTest)6 Fraction (com.xenoage.utils.math.Fraction)5 Staff (com.xenoage.zong.core.music.Staff)4 Beam (com.xenoage.zong.core.music.beam.Beam)4 Grace (com.xenoage.zong.core.music.chord.Grace)4 StemDirection (com.xenoage.zong.core.music.chord.StemDirection)4 Dynamic (com.xenoage.zong.core.music.direction.Dynamic)4 SlurWaypoint (com.xenoage.zong.core.music.slur.SlurWaypoint)4 ChordNotation (com.xenoage.zong.musiclayout.notation.ChordNotation)4 NoteDisplacement (com.xenoage.zong.musiclayout.notation.chord.NoteDisplacement)4