use of com.xenoage.zong.core.music.clef.ClefType in project Zong by Xenoage.
the class ClefReader method read.
public Clef read() {
if (mxlClef == null)
return null;
ClefType clefType = readType();
Clef clef = (clefType != null ? new Clef(clefType) : null);
return clef;
}
use of com.xenoage.zong.core.music.clef.ClefType in project Zong by Xenoage.
the class ClefReader method readLine.
private void readLine() {
// read line or use default position
Integer line = mxlClef.getLine();
if (line == null) {
clefType = ClefType.Companion.getCommonClefs().get(symbol);
} else {
// convert MusicXML line number (1 based) to LP (0 based)
int lp = (line - 1) * 2;
// in Zong!, it is centered, so move it 2 interline spaces down (= 4 LPs)
if (symbol == ClefSymbol.Tab || symbol == ClefSymbol.TabSmall)
lp -= 4;
clefType = new ClefType(symbol, lp);
}
}
use of com.xenoage.zong.core.music.clef.ClefType in project Zong by Xenoage.
the class Base46c method getExpectedClefs.
static List<Tuple2<MP, Clef>> getExpectedClefs() {
List<Tuple2<MP, Clef>> clefs = alist();
clefs.add(t(atBeat(0, 0, unknown, Companion.get_0()), new Clef(ClefType.Companion.getClefTreble())));
clefs.add(t(atBeat(0, 2, unknown, Companion.get_0()), new Clef(new ClefType(ClefSymbol.C, 2))));
clefs.add(t(atBeat(0, 3, unknown, Companion.fr(2, 4)), new Clef(ClefType.Companion.getClefTreble())));
return clefs;
}
Aggregations