diff --git a/bin/keyboardcomposer b/bin/keyboardcomposer --- a/bin/keyboardcomposer +++ b/bin/keyboardcomposer @@ -23,6 +23,10 @@ nudge_keys = { 'down' : list('asdfghjk') } +class DummySliders: + def valueOut(self, name, value): + pass + class SubScale(Scale, Fadable): def __init__(self, master, *args, **kw): self.scale_var = kw.get('variable') or DoubleVar() @@ -114,10 +118,7 @@ class KeyboardComposer(Frame, SubClient) if hw_sliders: self.sliders = Sliders(self.hw_slider_moved) else: - class dummy: - def valueOut(self, name, value): - pass - self.sliders = dummy() + self.sliders = DummySliders() def make_key_hints(self): keyhintrow = Frame(self) @@ -231,6 +232,9 @@ class KeyboardComposer(Frame, SubClient) col = (col + 1) % 8 def send_to_hw(self, subName, hwNum): + if isinstance(self.sliders, DummySliders): + return + v = round(127 * self.slider_vars[subName].get()) chan = "slider%s" % hwNum diff --git a/light9/networking.py b/light9/networking.py --- a/light9/networking.py +++ b/light9/networking.py @@ -12,14 +12,14 @@ def dmxServerPort(): return 8030 def musicUrl(): - return "http://localhost:%s" % musicPort() + return "http://score:%s" % musicPort() def musicPort(): return 8040 def mpdServer(): """servername, port""" - return os.getenv('LIGHT9_MPD_SERVER', 'dash'),6600 + return os.getenv('LIGHT9_MPD_SERVER', 'score'),6600 def kcPort(): return 8050 diff --git a/light9/showconfig.py b/light9/showconfig.py --- a/light9/showconfig.py +++ b/light9/showconfig.py @@ -8,6 +8,8 @@ from namespaces import MUS, L9 def getGraph(): global _config configPath = path.join(root(), 'config.n3') + + # file patch.n3 mtime is not currently being checked now = time.time() diskMtime = path.getmtime(configPath) @@ -22,6 +24,8 @@ def getGraph(): graph = Graph() graph.parse(configPath, format='n3') + graph.parse(path.join(root(), "patch.n3"), format="n3") + _config = (graph, diskMtime, len(graph)) return graph