public void InsertPitchedNote(int trackIndex, PitchedNote pitchedNote) { pitchedNote.timeRange.Start = System.Math.Max( 0, pitchedNote.timeRange.Start); pitchedNote.timeRange.End = System.Math.Min( this.length, pitchedNote.timeRange.End); if (pitchedNote.timeRange.Duration <= 0) { return; } var track = (TrackPitchedNotes)this.tracks[trackIndex]; track.InsertPitchedNote(pitchedNote); }
private void InsertPitchedNote(int trackIndex, float time, float duration, Util.Pitch pitch) { this.editor.UnselectAll(); var note = new Project.PitchedNote { pitch = pitch, timeRange = new Util.TimeRange(time, time + duration) }; this.currentProject.InsertPitchedNote(trackIndex, note); this.editor.Rebuild(); this.editor.SetPitchedNoteSelection(trackIndex, note, true); this.editor.SetNoteInsertionMode(true); this.editor.SetCursorTimeRange(time + duration, time + duration); this.editor.SetCursorVisible(true); this.editorControl.Refresh(); this.ExecuteAudioJob(new AudioOut.JobNotePreview(pitch.Frequency)); }
public void RemovePitchedNote(PitchedNote pitchedNote) { this.notes.Remove(pitchedNote); }
public void InsertPitchedNote(PitchedNote pitchedNote) { this.EraseRange(pitchedNote.timeRange, pitchedNote.pitch); this.notes.Add(pitchedNote); }
public void RemovePitchedNote(int trackIndex, PitchedNote pitchedNote) { var track = (TrackPitchedNotes)this.tracks[trackIndex]; track.RemovePitchedNote(pitchedNote); }