private McPitch(McNotePack parent, int naturePitch, PitchTypes pitchType) { this._parentNotePack = parent; this._value = naturePitch; this._semitoneValue = GetSemitoneValue(naturePitch); this._toneValue = GetToneValue(naturePitch); this._scaleLevel = GetScaleLevel(naturePitch); this._pitchType = pitchType; if (((parent != null) && parent.IsViald) && (this._pitchType != PitchTypes.Temporary)) { McUtility.MarkModified(parent.ParentMeasure); } }
public static McPitch FromNaturalPitchValue(McNotePack parent, int naturaPitch, PitchTypes pitchType = 2) { if (!IsNatural(naturaPitch)) { return(null); } return(new McPitch(parent, naturaPitch, pitchType)); }
public static McPitch FromNaturalPitchValue(int naturaPitch, PitchTypes pitchType = 2) => FromNaturalPitchValue(null, naturaPitch, pitchType);