コード例 #1
0
ファイル: Project.cs プロジェクト: hlorenzi/composer
        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);
        }
コード例 #2
0
ファイル: FormMain.cs プロジェクト: hlorenzi/composer
        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));
        }
コード例 #3
0
 public void RemovePitchedNote(PitchedNote pitchedNote)
 {
     this.notes.Remove(pitchedNote);
 }
コード例 #4
0
 public void InsertPitchedNote(PitchedNote pitchedNote)
 {
     this.EraseRange(pitchedNote.timeRange, pitchedNote.pitch);
     this.notes.Add(pitchedNote);
 }
コード例 #5
0
ファイル: Project.cs プロジェクト: hlorenzi/composer
        public void RemovePitchedNote(int trackIndex, PitchedNote pitchedNote)
        {
            var track = (TrackPitchedNotes)this.tracks[trackIndex];

            track.RemovePitchedNote(pitchedNote);
        }