/// <summary>
 /// Reads @accid and returns AccidentalType if matchable.
 /// Otherwise AccidType.Null if @accid doesn't exist and AccidType.Invalid if value of @accid doesn't match.
 /// </summary>
 /// <param name="_accid">MEI accid element</param>
 /// <returns>AccidType</returns>
 private static Model.AccidType GetAccidentalType(mei.IAttAccidental _accid)
 {
     if (_accid.HasAccid())
     {
         return(ConverterHelper.ConvertAccid(_accid.GetAccidAttribute()));
     }
     else
     {
         return(Model.AccidType.Null);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds properties to Note
        /// </summary>
        /// <param name="_note">MEI note element</param>
        /// <param name="_noteObject">Empty note object</param>
        /// <returns>Note object with content</returns>
        public static Model.Note ConvertNote(Model.Note _noteObject, mei.Note _note)
        {
            _noteObject.Coloration   = GetColoration(_note);
            _noteObject.Fermata      = GetFermata(_note);
            _noteObject.WrittenPitch = ConvertWrittenpitch(_note);
            _noteObject.Duration     = ConvertDuration(_note);
            _noteObject.Num          = ConverterHelper.ConvertNumNumbase(_note.GetNumAttribute());
            _noteObject.Numbase      = ConverterHelper.ConvertNumNumbase(_note.GetNumbaseAttribute());
            _noteObject.Stem         = ConvertStem(_note);
            if (_note.HasAccidGes())
            {
                _noteObject.AccidGes = ConverterHelper.ConvertAccid(_note.GetAccidGesAttribute());
            }

            return(_noteObject);
        }