public void ClearMeasureBeatsPerMinute(int measureIndex) { if ((measureIndex >= 0) && this._measureBeatsPerMinuteMap.ContainsKey(measureIndex)) { this._measureBeatsPerMinuteMap.Remove(measureIndex); McUtility.MarkModified(null); } }
public McRegularTrack(McNotation parentNotation) { this.ParentNotation = parentNotation; if (parentNotation != null) { McUtility.MarkModified(null); } }
public void ClearMeasureVolumeCurve(int measureIndex) { if ((measureIndex > 0) && this._measureVolumeCurveMap.ContainsKey(measureIndex)) { this._measureVolumeCurveMap.Remove(measureIndex); McUtility.MarkModified(this.GetMeasure(measureIndex)); } }
public McNotePack(McMeasure parentMeasure) { this.ParentMeasure = parentMeasure; this.TemporaryInfo = new NpTemporaryInfo(this); if (parentMeasure != null) { McUtility.MarkModified(parentMeasure); } }
public void ClearMeasureKeySignature(int measureIndex) { if ((measureIndex > 0) && this._measureKeySignatureMap.ContainsKey(measureIndex)) { this._measureKeySignatureMap.Remove(measureIndex); foreach (McRegularTrack track in this.ParentNotation.RegularTracks) { McUtility.MarkModified(track.GetMeasure(measureIndex)); } } }
public bool MarkPitch(int pitchValue, McPitch.PitchTypes pitchType) { if ((pitchValue < McPitch.PitchMin) || (pitchValue > McPitch.PitchMax)) { return(false); } if (!((pitchType != McPitch.PitchTypes.Enabled) || this.CanAppendNewPitch)) { return(false); } McPitch pitch = this._pitches[pitchValue]; McPitch.PitchTypes disabled = McPitch.PitchTypes.Disabled; if (pitch != null) { disabled = pitch.PitchType; } if ((disabled != pitchType) && this.IsViald) { this._pitches[pitchValue] = (pitchType != McPitch.PitchTypes.Disabled) ? McPitch.FromNaturalPitchValue(this, pitchValue, pitchType) : null; int num = (this.ParentMeasure.ClefType == McMeasure.ClefTypes.L2G) ? 0x2c : 0x17; int?nullable = null; int?nullable2 = null; for (int i = McPitch.PitchMin; i <= McPitch.PitchMax; i++) { if (this._pitches[i] != null) { if (!nullable.HasValue) { nullable = new int?(i); } nullable2 = new int?(i); } } int?nullable3 = nullable2; this.HighestPitchValue = nullable3.HasValue ? nullable3.GetValueOrDefault() : num; nullable3 = nullable; this.LowestPitchValue = nullable3.HasValue ? nullable3.GetValueOrDefault() : num; if (this.IsViald) { if (((disabled == McPitch.PitchTypes.Temporary) && (pitchType == McPitch.PitchTypes.Disabled)) || ((disabled == McPitch.PitchTypes.Disabled) && (pitchType == McPitch.PitchTypes.Temporary))) { McUtility.AppendRedrawingMeasure(this.ParentMeasure); } else { McUtility.MarkModified(this.ParentMeasure); } } } return(true); }
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 void Clear() { if (_hoveringNotePack != null) { _hoveringNotePack.IsHovering = false; } if (_hoveringMeasure != null) { _hoveringMeasure.IsHovering = false; McUtility.AppendRedrawingMeasure(_hoveringMeasure); } _hoveringInsertNotePackIndex = -1; _hoveringInsertPitchValue = 0; _hoveringNotePack = null; _hoveringMeasure = null; }
public void SetMeasureVolumeCurve(int measureIndex, VolumeCurve volumeCurve) { if (measureIndex >= 0) { if ((measureIndex > 0) && volumeCurve.Equals(this.GetMeasureVolumeCurve(measureIndex - 1))) { this.ClearMeasureVolumeCurve(measureIndex); } else { if (this._measureVolumeCurveMap.ContainsKey(measureIndex)) { this._measureVolumeCurveMap[measureIndex] = volumeCurve; } else { this._measureVolumeCurveMap.Add(measureIndex, volumeCurve); } McUtility.MarkModified(this.GetMeasure(measureIndex)); } } }
public void SetMeasureInstrumentType(int measureIndex, McMeasure.InstrumentTypes instrumentType) { if (measureIndex >= 0) { if ((measureIndex > 0) && (instrumentType == this.GetMeasureInstrumentType(measureIndex - 1))) { this.ClearMeasureInstrumentType(measureIndex); } else { if (this._measureInstrumentTypeMap.ContainsKey(measureIndex)) { this._measureInstrumentTypeMap[measureIndex] = instrumentType; } else { this._measureInstrumentTypeMap.Add(measureIndex, instrumentType); } McUtility.MarkModified(this.GetMeasure(measureIndex)); } } }
public void SetMeasureBeatsPerMinute(int measureIndex, int bpm) { if (measureIndex >= 0) { bpm = bpm.Clamp(BeatsPerMinuteMin, BeatsPerMinuteMax); if ((measureIndex > 0) && (bpm == this.GetMeasureBeatsPerMinute(measureIndex - 1))) { this.ClearMeasureBeatsPerMinute(measureIndex); } else { if (this._measureBeatsPerMinuteMap.ContainsKey(measureIndex)) { this._measureBeatsPerMinuteMap[measureIndex] = bpm; } else { this._measureBeatsPerMinuteMap.Add(measureIndex, bpm); } McUtility.MarkModified(null); } } }
public void ReorganizeAlignedMesaureurationStamps(int measureIndex, bool includeContext) { if ((measureIndex >= 0) && (measureIndex < this.MeasureCountAligned)) { McMeasure measure = this.RegularTracks.First <McRegularTrack>().GetMeasure(measureIndex); if (measure != null) { foreach (McMeasure measure2 in measure.MeasuresAligned) { if (includeContext && (measure2.PreMeasure != null)) { measure2.PreMeasure.ReorganizeDurationStamps(); } measure2.ReorganizeDurationStamps(); if (includeContext && (measure2.NextMeasure != null)) { measure2.NextMeasure.ReorganizeDurationStamps(); } McUtility.MarkModified(measure2); } } } }
public void SetMeasureVolume(int measureIndex, float volume) { if (measureIndex >= 0) { volume = volume.Clamp(0f, 1f); if ((measureIndex > 0) && (Math.Abs((float)(this.GetMeasureVolume(measureIndex - 1) - volume)) < 0.01)) { this.ClearMeasureVolume(measureIndex); } else { if (this._measureVolumeMap.ContainsKey(measureIndex)) { this._measureVolumeMap[measureIndex] = volume; } else { this._measureVolumeMap.Add(measureIndex, volume); } McUtility.MarkModified(this.GetMeasure(measureIndex)); } } }
public void SetMeasureKeySignature(int measureIndex, int keySignature) { if (measureIndex >= 0) { keySignature = keySignature.Clamp(McMeasure.KeySignatureMin, McMeasure.KeySignatureMax); if ((measureIndex > 0) && (keySignature == this.GetMeasureKeySignature(measureIndex - 1))) { this.ClearMeasureKeySignature(measureIndex); } else { if (this._measureKeySignatureMap.ContainsKey(measureIndex)) { this._measureKeySignatureMap[measureIndex] = keySignature; } else { this._measureKeySignatureMap.Add(measureIndex, keySignature); } McUtility.MarkModified(this.GetMeasure(measureIndex)); } } }
public void _SetVolumeRaw(float volume) { this._volume = volume.Clamp(0f, 1f); McUtility.MarkModified(this.ParentMeasure); }