Search in sources :

Example 1 with Mode

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;
}
Also used : Mode(com.xenoage.zong.core.music.key.TraditionalKey.Mode) TraditionalKey(com.xenoage.zong.core.music.key.TraditionalKey) TraditionalKey(com.xenoage.zong.core.music.key.TraditionalKey) Key(com.xenoage.zong.core.music.key.Key)

Aggregations

Key (com.xenoage.zong.core.music.key.Key)1 TraditionalKey (com.xenoage.zong.core.music.key.TraditionalKey)1 Mode (com.xenoage.zong.core.music.key.TraditionalKey.Mode)1