Skip to content

Commit 3cac424

Browse files
committed
Track: Record notes using track time, not timeline time
1 parent da7a789 commit 3cac424

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

isobar/timelines/track.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ def _on_note_on(self, note: MidiNote):
831831
self.output_device.note_on(note.pitch, note.velocity, note.channel)
832832

833833
if self._is_recording:
834-
self._recording_notes[note.pitch] = (self.timeline.current_time, note.velocity, note.channel)
834+
self._recording_notes[note.pitch] = (self.current_time, note.velocity, note.channel)
835835

836836
def _on_note_off(self, note: MidiNote):
837837
if not (self._is_recording or self._monitor):
@@ -842,7 +842,7 @@ def _on_note_off(self, note: MidiNote):
842842

843843
if note.pitch in self._recording_notes:
844844
start_time, velocity, channel = self._recording_notes.pop(note.pitch)
845-
end_time = self.timeline.current_time
845+
end_time = self.current_time
846846
duration = end_time - start_time
847847

848848
#--------------------------------------------------------------------------------

0 commit comments

Comments
 (0)