Skip to content

Commit

Permalink
Fix: timecode messages are now sent #329
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoCeruti committed Sep 24, 2024
1 parent 65fcd82 commit f1df767
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lisp/plugins/timecode/cue_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -122,7 +122,7 @@ def send(self, time):
)
)
self.untrack()
except Exception:
finally:
self.__lock.release()

def finalize(self):
Expand Down
14 changes: 7 additions & 7 deletions lisp/plugins/timecode/protocols/midi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
Expand Down

0 comments on commit f1df767

Please sign in to comment.