use of com.xenoage.zong.core.music.MusicContext in project Zong by Xenoage.
the class StemNotatorTest method testPitch.
private void testPitch(Pitch[] pitches, float start, float end) {
MusicContext context = MusicContext.Companion.getSimpleInstance();
Chord chord;
NotesNotation chordNotesAlignment;
StemNotation chordStemAlignment;
Fraction fraction = Companion.fr(1, 1);
chord = ChordFactory.chord(pitches, fraction);
ChordLps linepositions = new ChordLps(chord, context);
StemDirection stemDirection = singleStemDirector.compute(linepositions, 5);
chordNotesAlignment = notesNotator.compute(chord, stemDirection, defaultChordWidthsNormal, context);
chordStemAlignment = testee.compute(Stem.Companion.getDefaultStem(), chordNotesAlignment.getLps(), stemDirection, 0, Companion.getStaff5Lines(), 1);
assertEquals(start, chordStemAlignment.startSlp.lp, Delta.DELTA_FLOAT);
assertEquals(end, chordStemAlignment.endSlp.lp, Delta.DELTA_FLOAT);
}
Aggregations