Skip to content

Commit 0738c80

Browse files
authored
Merge pull request #78 from tito/displax-tag
Support for t typehint of TUIO 2.0 support (used by displax tag)
2 parents 696e5b9 + 4ea5283 commit 0738c80

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

oscpy/parser.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ def parse_midi(value, offset=0, **kwargs):
107107
return midi, len(midi)
108108

109109

110+
def parse_timeage(value, offset=0, **kwargs):
111+
"""Return the 64bit OSC value as sec/nsec"""
112+
sec = unpack_from('>Q', value, offset)[0]
113+
return sec, 8
114+
115+
110116
def format_midi(value):
111117
return sum((val & 0xFF) << 8 * (3 - pos) for pos, val in enumerate(value))
112118

@@ -154,6 +160,7 @@ def format_infinitum(value):
154160
b'F': parse_false,
155161
b'N': parse_nil,
156162
b'I': parse_infinitum,
163+
b't': parse_timeage,
157164
# TODO
158165
# b'h': parse_long,
159166
# b't': parse_timetage,

0 commit comments

Comments
 (0)