File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -892,6 +892,9 @@ def _on_note_on(self, note: MidiNote):
892892 #--------------------------------------------------------------------------------
893893 if self ._monitor :
894894 self .output_device .note_on (note .pitch , note .velocity , note .channel )
895+
896+ if not self .timeline .is_running :
897+ return
895898
896899 if self ._is_recording :
897900 self ._recording_notes [note .pitch ] = (self .current_time , note .velocity , note .channel )
@@ -903,6 +906,9 @@ def _on_note_off(self, note: MidiNote):
903906 if self ._monitor :
904907 self .output_device .note_off (note .pitch , note .channel )
905908
909+ if not self .timeline .is_running :
910+ return
911+
906912 if note .pitch in self ._recording_notes :
907913 start_time , velocity , channel = self ._recording_notes .pop (note .pitch )
908914 end_time = self .current_time
You can’t perform that action at this time.
0 commit comments