print bus level values in observer example

This commit is contained in:
onyx-and-iris 2022-10-04 14:36:46 +01:00
parent f62a22f563
commit 30370f70ee

View File

@ -18,14 +18,9 @@ class Observer:
elif subject == "mdirty": elif subject == "mdirty":
print("mdirty!") print("mdirty!")
elif subject == "ldirty": elif subject == "ldirty":
info = ( for bus in self.vm.bus:
f"[{self.vm.bus[0]} {self.vm.bus[0].levels.isdirty}]", if bus.levels.isdirty:
f"[{self.vm.bus[1]} {self.vm.bus[1].levels.isdirty}]", print(bus, bus.levels.all)
f"[{self.vm.bus[2]} {self.vm.bus[2].levels.isdirty}]",
f"[{self.vm.bus[3]} {self.vm.bus[3].levels.isdirty}]",
f"[{self.vm.bus[4]} {self.vm.bus[4].levels.isdirty}]",
)
print(" ".join(info))
elif subject == "midi": elif subject == "midi":
current = self.vm.midi.current current = self.vm.midi.current
print(f"Value of midi button {current} is {self.vm.midi.get(current)}") print(f"Value of midi button {current} is {self.vm.midi.get(current)}")