equal
deleted
inserted
replaced
11 from txosc import dispatch |
11 from txosc import dispatch |
12 from txosc.osc import getAddressParts |
12 from txosc.osc import getAddressParts |
13 from txosc.async import DatagramServerProtocol |
13 from txosc.async import DatagramServerProtocol |
14 |
14 |
15 import ntplib |
15 import ntplib |
|
16 |
|
17 from dateutil.tz import tzutc |
16 |
18 |
17 from baseserver import BaseProtocol |
19 from baseserver import BaseProtocol |
18 import utils |
20 import utils |
19 |
21 |
20 |
22 |
29 self._init_props(ws_factory, conn) |
31 self._init_props(ws_factory, conn) |
30 |
32 |
31 def processPianorollAnnotation(self, message, address): |
33 def processPianorollAnnotation(self, message, address): |
32 |
34 |
33 values = message.getValues() |
35 values = message.getValues() |
34 ts = datetime.datetime.utcfromtimestamp(ntplib.ntp_to_system_time(values[0])) |
36 ts = datetime.datetime.fromtimestamp(ntplib.ntp_to_system_time(values[0]), tzutc()) |
35 |
37 |
36 params = { |
38 params = { |
37 'ts' : ts, |
39 'ts' : ts, |
38 'event': getAddressParts(message.address)[1], |
40 'event': getAddressParts(message.address)[1], |
39 'channel' : utils.PIANOROLL_CHANNEL, |
41 'channel' : utils.PIANOROLL_CHANNEL, |