From f1df767409e04ff4c3181ecffd2cab9fd1134698 Mon Sep 17 00:00:00 2001 From: Francesco Ceruti Date: Tue, 24 Sep 2024 23:30:18 +0200 Subject: [PATCH] Fix: timecode messages are now sent #329 --- lisp/plugins/timecode/cue_tracker.py | 4 ++-- lisp/plugins/timecode/protocols/midi.py | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/plugins/timecode/cue_tracker.py b/lisp/plugins/timecode/cue_tracker.py index a4c53d4f4..935425ab0 100644 --- a/lisp/plugins/timecode/cue_tracker.py +++ b/lisp/plugins/timecode/cue_tracker.py @@ -41,7 +41,7 @@ class HRCueTime(CueTime): class TimecodeCueTracker: def __init__(self, protocol, tc_format): """ - :param protocol: The protocol to be use to send timecode + :param protocol: The protocol to be uses to send timecode :type protocol: lisp.plugins.timecode.protocol.TimecodeProtocol :param tc_format: The format in which to send timecode :type tc_format: TcFormat @@ -122,7 +122,7 @@ def send(self, time): ) ) self.untrack() - except Exception: + finally: self.__lock.release() def finalize(self): diff --git a/lisp/plugins/timecode/protocols/midi.py b/lisp/plugins/timecode/protocols/midi.py index cd46daf3c..ce2c9e769 100644 --- a/lisp/plugins/timecode/protocols/midi.py +++ b/lisp/plugins/timecode/protocols/midi.py @@ -48,9 +48,9 @@ def __init__(self): self.__midi = get_plugin("Midi") def __send_full(self, fmt, hours, minutes, seconds, frame): - """Sends fullframe timecode message. + """Sends full-frame timecode message. - Used in case timecode is non continuous (repositioning, rewind). + Used in case timecode is non-continuous (repositioning, rewind). """ message = Message( "sysex", @@ -70,15 +70,15 @@ def __send_full(self, fmt, hours, minutes, seconds, frame): self.__midi.output.send(message) def __send_quarter(self, frame_type, fmt, hours, minutes, seconds, frame): - """Send quarterframe midi message.""" - messsage = Message("quarter_frame") - messsage.frame_type = frame_type - messsage.frame_value = FRAME_VALUES[frame_type]( + """Send quarter-frame midi message.""" + message = Message("quarter_frame") + message.frame_type = frame_type + message.frame_value = FRAME_VALUES[frame_type]( hours, minutes, seconds, frame, MIDI_FORMATS[fmt] ) if self.__midi is not None: - self.__midi.send(messsage) + self.__midi.output.send(message) def send(self, format, time, track=-1): # Split the time in its components