コード例 #1
0
ファイル: McPitch.cs プロジェクト: knva/GujianOL_MusicBox
 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);
     }
 }
コード例 #2
0
ファイル: McPitch.cs プロジェクト: knva/GujianOL_MusicBox
 public static McPitch FromNaturalPitchValue(McNotePack parent, int naturaPitch, PitchTypes pitchType = 2)
 {
     if (!IsNatural(naturaPitch))
     {
         return(null);
     }
     return(new McPitch(parent, naturaPitch, pitchType));
 }
コード例 #3
0
ファイル: McPitch.cs プロジェクト: knva/GujianOL_MusicBox
 public static McPitch FromNaturalPitchValue(int naturaPitch, PitchTypes pitchType = 2) =>
 FromNaturalPitchValue(null, naturaPitch, pitchType);