mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2026-04-06 23:53:31 +00:00
fadto() fadeby() methods added to strip/bus classes
appgain(), appmute() methods added to virtualstrip class
This commit is contained in:
@@ -43,6 +43,14 @@ class Bus(IRemote):
|
||||
def gain(self, val: float):
|
||||
self.setter("gain", val)
|
||||
|
||||
def fadeto(self, target: float, time_: int):
|
||||
self.setter("FadeTo", f"({target}, {time_})")
|
||||
time.sleep(self._remote.DELAY)
|
||||
|
||||
def fadeby(self, change: float, time_: int):
|
||||
self.setter("FadeBy", f"({change}, {time_})")
|
||||
time.sleep(self._remote.DELAY)
|
||||
|
||||
|
||||
class PhysicalBus(Bus):
|
||||
def __str__(self):
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import time
|
||||
from abc import abstractmethod
|
||||
from typing import Union
|
||||
|
||||
@@ -40,6 +41,14 @@ class Strip(IRemote):
|
||||
def gain(self, val: float):
|
||||
self.setter("gain", val)
|
||||
|
||||
def fadeto(self, target: float, time_: int):
|
||||
self.setter("FadeTo", f"({target}, {time_})")
|
||||
time.sleep(self._remote.DELAY)
|
||||
|
||||
def fadeby(self, change: float, time_: int):
|
||||
self.setter("FadeBy", f"({change}, {time_})")
|
||||
time.sleep(self._remote.DELAY)
|
||||
|
||||
|
||||
class PhysicalStrip(Strip):
|
||||
def __str__(self):
|
||||
@@ -86,6 +95,12 @@ class VirtualStrip(Strip):
|
||||
def k(self, val: int):
|
||||
self.setter("karaoke", val)
|
||||
|
||||
def appgain(self, name: str, gain: float):
|
||||
self.setter("AppGain", f'("{name}", {gain})')
|
||||
|
||||
def appmute(self, name: str, mute: bool = None):
|
||||
self.setter("AppMute", f'("{name}", {1 if mute else 0})')
|
||||
|
||||
|
||||
class StripLevel(IRemote):
|
||||
def __init__(self, remote, index):
|
||||
|
||||
Reference in New Issue
Block a user