use of com.xenoage.zong.core.music.key.TraditionalKey.Mode in project Zong by Xenoage.
the class AttributesReader method readKey.
private Key readKey(MxlKey mxlKey) {
if (mxlKey == null)
return null;
// read fifths. currently, only -7 to 7 is supported (clamp, if needed)
int mxlFifths = INSTANCE.clamp(mxlKey.fifths, -7, 7);
// write to column header (TODO: attribute "number" for single staves)
Mode mode = getEnumValue(mxlKey.mode, Mode.values());
Key key = new TraditionalKey(mxlFifths, mode);
return key;
}
Aggregations