-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__main__.py
More file actions
46 lines (36 loc) · 1.09 KB
/
__main__.py
File metadata and controls
46 lines (36 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import vban_cmd
class ManyThings:
def __init__(self, vban):
self.vban = vban
def things(self):
self.vban.strip[0].label = 'podmic'
self.vban.strip[0].mute = True
print(
f'strip 0 ({self.vban.strip[0].label}) mute has been set to {self.vban.strip[0].mute}'
)
def other_things(self):
self.vban.bus[3].gain = -6.3
self.vban.bus[4].eq = True
info = (
f'bus 3 gain has been set to {self.vban.bus[3].gain}',
f'bus 4 eq has been set to {self.vban.bus[4].eq}',
)
print('\n'.join(info))
def main():
KIND_ID = 'banana'
with vban_cmd.api(
KIND_ID, ip='gamepc.local', port=6980, streamname='Command1'
) as vban:
do = ManyThings(vban)
do.things()
do.other_things()
# set many parameters at once
vban.apply(
{
'strip-2': {'A1': True, 'B1': True, 'gain': -6.0},
'bus-2': {'mute': True},
'vban-in-0': {'on': True},
}
)
if __name__ == '__main__':
main()