File tree 1 file changed +22
-2
lines changed 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -630,11 +630,31 @@ void MIDIContentViewer::insertNote(
630
630
}
631
631
632
632
void MIDIContentViewer::setNoteStartTime (int tempIndex, double time) {
633
- /* * TODO */
633
+ /* * Get Note */
634
+ if (tempIndex < 0 || tempIndex >= this ->noteRectTempList .size ()) { return ; }
635
+ auto [index , rect, channel] = this ->noteRectTempList [tempIndex];
636
+
637
+ if (index < 0 || index >= this ->midiDataTemp .size ()) { return ; }
638
+ auto note = this ->midiDataTemp [index ];
639
+
640
+ /* * Set Time */
641
+ CoreActions::midiSetNoteTime (
642
+ this ->ref , this ->currentMIDITrack ,
643
+ index , time , note.endSec );
634
644
}
635
645
636
646
void MIDIContentViewer::setNoteEndTime (int tempIndex, double time) {
637
- /* * TODO */
647
+ /* * Get Note */
648
+ if (tempIndex < 0 || tempIndex >= this ->noteRectTempList .size ()) { return ; }
649
+ auto [index , rect, channel] = this ->noteRectTempList [tempIndex];
650
+
651
+ if (index < 0 || index >= this ->midiDataTemp .size ()) { return ; }
652
+ auto note = this ->midiDataTemp [index ];
653
+
654
+ /* * Set Time */
655
+ CoreActions::midiSetNoteTime (
656
+ this ->ref , this ->currentMIDITrack ,
657
+ index , note.startSec , time );
638
658
}
639
659
640
660
void MIDIContentViewer::updateKeyImageTemp () {
You can’t perform that action at this time.
0 commit comments