mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2026-04-18 12:33:34 +00:00
initial commit
initial commit
This commit is contained in:
46
__main__.py
Normal file
46
__main__.py
Normal file
@@ -0,0 +1,46 @@
|
||||
import voicemeeterlib
|
||||
|
||||
|
||||
class ManyThings:
|
||||
def __init__(self, vm):
|
||||
self.vm = vm
|
||||
|
||||
def things(self):
|
||||
self.vm.strip[0].label = "podmic"
|
||||
self.vm.strip[0].mute = True
|
||||
print(
|
||||
f"strip 0 ({self.vm.strip[0].label}) has been set to {self.vm.strip[0].mute}"
|
||||
)
|
||||
|
||||
def other_things(self):
|
||||
info = (
|
||||
f"bus 3 gain has been set to {self.vm.bus[3].gain}",
|
||||
f"bus 4 eq has been set to {self.vm.bus[4].eq}",
|
||||
)
|
||||
self.vm.bus[3].gain = -6.3
|
||||
self.vm.bus[4].eq = True
|
||||
print("\n".join(info))
|
||||
|
||||
|
||||
def main():
|
||||
with voicemeeterlib.api(kind_id) as vm:
|
||||
do = ManyThings(vm)
|
||||
do.things()
|
||||
do.other_things()
|
||||
|
||||
# set many parameters at once
|
||||
vm.apply(
|
||||
{
|
||||
"strip-2": {"A1": True, "B1": True, "gain": -6.0},
|
||||
"bus-2": {"mute": True},
|
||||
"button-0": {"state": True},
|
||||
"vban-in-0": {"on": True},
|
||||
"vban-out-1": {"name": "streamname"},
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
kind_id = "banana"
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user