diff options
author | Ben Connors <benconnors@outlook.com> | 2019-10-29 22:11:00 -0400 |
---|---|---|
committer | Ben Connors <benconnors@outlook.com> | 2019-10-29 22:11:00 -0400 |
commit | 91bbc033d03df9b71637fb6bb6ad9d8ec8bbfa9c (patch) | |
tree | 87a450615c72fdbd0e794030f638acc99a6526e9 /interface/dummy.py | |
parent | 0e845a0dca629b40166f95cf6d266181af605555 (diff) |
Fixes; Implement basic renderer
- Fix chaser oneshot a bit (still doesn't work)
- Basic implementation of a live renderer
- Still needs functions for manipulating function data
- Lacks audio fades, pause, seek
Diffstat (limited to 'interface/dummy.py')
-rw-r--r-- | interface/dummy.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/interface/dummy.py b/interface/dummy.py new file mode 100644 index 0000000..ab03ae0 --- /dev/null +++ b/interface/dummy.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 + +import array +import socket +import threading + +class DummyOutput: + def set_values(self, values): + v = {c.address[1]: v for c, v in values.items()} + with self._lock: + self.s.sendall(array.array('B', ((0 if i not in v else v[i]) for i in range(64))).tobytes()) + + def __init__(self): + self._lock = threading.RLock() + self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + self.s.connect(("", 6969)) + |