Esempio n. 1
0
 @Before
 public void before() {
   Score score = getScore();
   for (int iMeasure : range(5)) {
     chords[iMeasure] = (Chord) score.getVoice(atVoice(0, iMeasure, 0)).getElement(0);
   }
 }
Esempio n. 2
0
 @Test
 public void test() {
   Score score = getScore();
   MP mp = mp0;
   for (int i = 0; i < expectedChords.length; i++) {
     Chord chord = (Chord) score.getVoice(mp).getElementAt(mp.beat);
     assertEquals("chord " + i, expectedChords[i].getNotes(), chord.getNotes());
     assertEquals("chord " + i, expectedChords[i].getDuration(), chord.getDuration());
     mp = mp.withBeat(mp.beat.add(expectedChords[i].getDuration()));
     if (mp.beat.compareTo(_1) >= 0) {
       mp = mp.withMeasure(mp.measure + 1).withBeat(_0);
     }
   }
 }