Update __main__.py

update main
This commit is contained in:
onyx-and-iris 2022-03-04 14:30:51 +00:00
parent e4da797657
commit e0d83f91e7

View File

@ -1,20 +1,27 @@
import vban_cmd import vbancmd
class ManyThings:
def __init__(self, vban):
self.vban = vban
def things(self):
# Set the mapping of the second input strip
self.vban.strip[1].A3 = True
print(f'Output A3 of Strip {self.vban.strip[1].label}: {self.vban.strip[1].A3}')
def other_things(self):
# Toggle mute for the leftmost output bus
self.vban.bus[0].mute = not self.vban.bus[0].mute
def main(): def main():
with vban_cmd.connect('potato', ip=ip, port=port, streamname=streamname, bps=bps, channel=channel) as vban: with vbancmd.connect(kind_id, ip=ip) as vban:
for param in ['A1', 'A2', 'A3', 'A4', 'A5', 'B1', 'B2', 'B3', 'mono', 'mute']: do = ManyThings(vban)
setattr(vban.strip[0], param, True) do.things()
print(getattr(vban.strip[0], param)) do.other_things()
setattr(vban.strip[0], param, False)
print(getattr(vban.strip[0], param))
if __name__ == '__main__': if __name__ == '__main__':
kind_id = 'potato' kind_id = 'potato'
ip = 'ws.local' ip = '<ip address>'
port=6980
streamname = 'testing'
bps = 57600
channel=3
main() main()