Search in sources :

Example 6 with ToDo

use of musicxmltestsuite.tests.utils.ToDo in project Zong by Xenoage.

the class Test01a method test.

@ToDo("the editiorial sharp (sharp in parenthesis) in the last measure is not supported yet")
@Test
public void test() {
    int[] expectedLPs = getExpectedLPs();
    Staff staff = getFirstStaff();
    ScoreFrameLayout scoreFrameLayout = getScoreFrameLayout();
    int chordIndex = 0;
    for (int iM = 0; iM < staff.getMeasures().size(); iM++) {
        Measure measure = staff.getMeasures().get(iM);
        Voice voice = measure.getVoice(0);
        for (VoiceElement e : voice.getElements()) {
            if (e instanceof Chord) {
            // check LP
            // TODO
            }
        }
    }
}
Also used : VoiceElement(com.xenoage.zong.core.music.VoiceElement) Staff(com.xenoage.zong.core.music.Staff) Measure(com.xenoage.zong.core.music.Measure) ScoreFrameLayout(com.xenoage.zong.musiclayout.ScoreFrameLayout) Voice(com.xenoage.zong.core.music.Voice) Chord(com.xenoage.zong.core.music.chord.Chord) ToDo(musicxmltestsuite.tests.utils.ToDo) Test(org.junit.Test)

Example 7 with ToDo

use of musicxmltestsuite.tests.utils.ToDo in project Zong by Xenoage.

the class Test01a method test.

@ToDo("the editiorial sharp (sharp in parenthesis) in the last measure is not supported yet")
@Test
public void test() {
    Pitch[] expectedPitches = getExpectedPitches();
    MxlPart part = getFirstPart();
    assertEquals(26, part.getMeasures().size());
    int iPitch = 0;
    for (int iM = 0; iM < part.getMeasures().size(); iM++) {
        MxlMeasure measure = part.getMeasures().get(iM);
        for (MxlMusicDataContent data : measure.getMusicData().getContent()) {
            if (data.getMusicDataContentType() == MxlMusicDataContentType.Note) {
                // check note and pitch
                MxlFullNote note = ((MxlNote) data).getContent().getFullNote();
                MxlPitch pitch = (MxlPitch) (note.getContent());
                assertEquals("note " + iPitch, expectedPitches[iPitch++], pitch.getPitch());
            }
        }
    }
    assertEquals("not all notes found", expectedPitches.length, iPitch);
}
Also used : MxlMusicDataContent(com.xenoage.zong.musicxml.types.choice.MxlMusicDataContent) MxlFullNote(com.xenoage.zong.musicxml.types.groups.MxlFullNote) MxlPitch(com.xenoage.zong.musicxml.types.MxlPitch) MxlPitch(com.xenoage.zong.musicxml.types.MxlPitch) Pitch(com.xenoage.zong.core.music.Pitch) MxlPart(com.xenoage.zong.musicxml.types.partwise.MxlPart) MxlMeasure(com.xenoage.zong.musicxml.types.partwise.MxlMeasure) ToDo(musicxmltestsuite.tests.utils.ToDo) Test(org.junit.Test)

Aggregations

ToDo (musicxmltestsuite.tests.utils.ToDo)7 Test (org.junit.Test)7 MxlMusicDataContent (com.xenoage.zong.musicxml.types.choice.MxlMusicDataContent)4 MxlMeasure (com.xenoage.zong.musicxml.types.partwise.MxlMeasure)4 MxlPart (com.xenoage.zong.musicxml.types.partwise.MxlPart)4 Measure (com.xenoage.zong.core.music.Measure)2 Pitch (com.xenoage.zong.core.music.Pitch)2 Staff (com.xenoage.zong.core.music.Staff)2 Voice (com.xenoage.zong.core.music.Voice)2 VoiceElement (com.xenoage.zong.core.music.VoiceElement)2 Chord (com.xenoage.zong.core.music.chord.Chord)2 MxlNormalNote (com.xenoage.zong.musicxml.types.choice.MxlNormalNote)2 Score (com.xenoage.zong.core.Score)1 Direction (com.xenoage.zong.core.music.direction.Direction)1 NavigationSign (com.xenoage.zong.core.music.direction.NavigationSign)1 Tempo (com.xenoage.zong.core.music.direction.Tempo)1 TraditionalKey (com.xenoage.zong.core.music.key.TraditionalKey)1 MP (com.xenoage.zong.core.position.MP)1 ScoreFrameLayout (com.xenoage.zong.musiclayout.ScoreFrameLayout)1 MxlAttributes (com.xenoage.zong.musicxml.types.MxlAttributes)1