Exemple #1
0
        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);
        }
Exemple #2
0
        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));
        }
Exemple #3
0
 public void RemovePitchedNote(PitchedNote pitchedNote)
 {
     this.notes.Remove(pitchedNote);
 }
Exemple #4
0
 public void InsertPitchedNote(PitchedNote pitchedNote)
 {
     this.EraseRange(pitchedNote.timeRange, pitchedNote.pitch);
     this.notes.Add(pitchedNote);
 }
Exemple #5
0
        public void RemovePitchedNote(int trackIndex, PitchedNote pitchedNote)
        {
            var track = (TrackPitchedNotes)this.tracks[trackIndex];

            track.RemovePitchedNote(pitchedNote);
        }