use of com.xenoage.zong.core.text.UnformattedText in project Zong by Xenoage.
the class Base21d method getExpectedDirections.
default List<Tuple2<MP, ? extends Direction>> getExpectedDirections() {
List<Tuple2<MP, ? extends Direction>> expectedDirections = alist();
Words largo = new Words(new UnformattedText("Largo"));
largo.setPositioning(Placement.Above);
expectedDirections.add(t(mp0, largo));
Dynamic fp = new Dynamic(DynamicValue.fp);
fp.setPositioning(Placement.Below);
expectedDirections.add(t(mp0, fp));
Dynamic p = new Dynamic(DynamicValue.p);
fp.setPositioning(Placement.Below);
expectedDirections.add(t(mp0.withMeasure(1), p));
return expectedDirections;
}
use of com.xenoage.zong.core.text.UnformattedText in project Zong by Xenoage.
the class MeasureElementIteratorTest method createTestScore.
/**
* Test score with 4 staves and 4 measures. In staves 1 and 3, the measures 1 and 3 have each
* three words with text "staff x, measure y, element z" on beats 1/4 and 2/4
*/
public static Score createTestScore() {
Score score = new Score();
Cursor cursor = new Cursor(score, MP.mp0, true);
for (int staff : new int[] { 1, 3 }) {
for (int measure : new int[] { 1, 3 }) {
cursor.setMp(atElement(staff, measure, 0, 0));
for (int element : range(2)) {
cursor.write(new Rest(Companion.fr(1, 4)));
cursor.write((MeasureElement) new Words(new UnformattedText("staff " + staff + ", measure " + measure + ", element " + element)));
}
}
}
return score;
}
Aggregations