/// <summary> /// The clefType must be one of the following strings "t", "t1", "t2", "t3", "b", "b1", "b2", "b3" /// The followingUniqueMidiChordOrRestDef must be a MidiChordDef or UniqueMidiRestDef. /// </summary> public ClefChangeDef(string clefType, IUniqueDef followingUniqueChordOrRestDef) : base() { #region check args if (String.Equals(clefType, "t") == false && String.Equals(clefType, "t1") == false && String.Equals(clefType, "t2") == false && String.Equals(clefType, "t3") == false && String.Equals(clefType, "b") == false && String.Equals(clefType, "b1") == false && String.Equals(clefType, "b2") == false && String.Equals(clefType, "b3") == false) { Debug.Assert(false, "Unknown clef type."); } if (!(followingUniqueChordOrRestDef is MidiChordDef) && !(followingUniqueChordOrRestDef is InputChordDef) && !(followingUniqueChordOrRestDef is RestDef)) { Debug.Assert(false, "Clef change must be followed by a chord or rest."); } #endregion _id = "clefChange" + UniqueClefChangeIDNumber.ToString(); _clefType = clefType; _followingChordOrRestDef = followingUniqueChordOrRestDef; }
public ClefDef(string clefType, int msPositionReFirstIUD) : base() { #region check args if (String.Equals(clefType, "t") == false && String.Equals(clefType, "t1") == false && String.Equals(clefType, "t2") == false && String.Equals(clefType, "t3") == false && String.Equals(clefType, "b") == false && String.Equals(clefType, "b1") == false && String.Equals(clefType, "b2") == false && String.Equals(clefType, "b3") == false) { M.Assert(false, "Unknown clef type."); } #endregion _id = "clefChange" + UniqueClefChangeIDNumber.ToString(); _clefType = clefType; MsPositionReFirstUD = msPositionReFirstIUD; }