2022-06-16 16:10:06 +01:00
|
|
|
import vban_cmd
|
|
|
|
|
2022-02-25 14:37:23 +00:00
|
|
|
|
2022-03-04 14:30:51 +00:00
|
|
|
class ManyThings:
|
|
|
|
def __init__(self, vban):
|
|
|
|
self.vban = vban
|
|
|
|
|
|
|
|
def things(self):
|
2025-01-17 02:51:17 +00:00
|
|
|
self.vban.strip[0].label = 'podmic'
|
2022-06-16 16:10:06 +01:00
|
|
|
self.vban.strip[0].mute = True
|
|
|
|
print(
|
2025-01-17 02:51:17 +00:00
|
|
|
f'strip 0 ({self.vban.strip[0].label}) mute has been set to {self.vban.strip[0].mute}'
|
2022-06-16 16:10:06 +01:00
|
|
|
)
|
2022-03-04 14:30:51 +00:00
|
|
|
|
|
|
|
def other_things(self):
|
2022-10-19 21:10:59 +01:00
|
|
|
self.vban.bus[3].gain = -6.3
|
|
|
|
self.vban.bus[4].eq = True
|
2022-06-16 16:10:06 +01:00
|
|
|
info = (
|
2025-01-17 02:51:17 +00:00
|
|
|
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}',
|
2022-06-16 16:10:06 +01:00
|
|
|
)
|
2025-01-17 02:51:17 +00:00
|
|
|
print('\n'.join(info))
|
2022-02-28 18:14:31 +00:00
|
|
|
|
2022-02-25 14:37:23 +00:00
|
|
|
|
2022-03-04 14:30:51 +00:00
|
|
|
def main():
|
2025-01-17 02:51:17 +00:00
|
|
|
kind_id = 'banana'
|
2022-11-05 12:16:25 +00:00
|
|
|
|
2022-10-19 21:10:59 +01:00
|
|
|
with vban_cmd.api(
|
2025-01-17 02:51:17 +00:00
|
|
|
kind_id, ip='gamepc.local', port=6980, streamname='Command1'
|
2022-10-19 21:10:59 +01:00
|
|
|
) as vban:
|
2022-03-04 14:30:51 +00:00
|
|
|
do = ManyThings(vban)
|
|
|
|
do.things()
|
|
|
|
do.other_things()
|
|
|
|
|
2022-06-16 16:10:06 +01:00
|
|
|
# set many parameters at once
|
|
|
|
vban.apply(
|
|
|
|
{
|
2025-01-17 02:51:17 +00:00
|
|
|
'strip-2': {'A1': True, 'B1': True, 'gain': -6.0},
|
|
|
|
'bus-2': {'mute': True},
|
|
|
|
'vban-in-0': {'on': True},
|
2022-06-16 16:10:06 +01:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2025-01-17 02:51:17 +00:00
|
|
|
if __name__ == '__main__':
|
2022-02-25 15:17:05 +00:00
|
|
|
main()
|