mirror of
https://github.com/onyx-and-iris/xair-api-python.git
synced 2024-11-15 17:40:57 +00:00
upd decorator func names
This commit is contained in:
parent
a62a46d61a
commit
f3cf215a76
@ -90,12 +90,12 @@ class Config(IConfig):
|
|||||||
return f"{root}/solo"
|
return f"{root}/solo"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@util.from_db
|
@util.db_from
|
||||||
def level(self) -> float:
|
def level(self) -> float:
|
||||||
return self.getter("level")[0]
|
return self.getter("level")[0]
|
||||||
|
|
||||||
@level.setter
|
@level.setter
|
||||||
@util.to_db
|
@util.db_to
|
||||||
def level(self, val: float):
|
def level(self, val: float):
|
||||||
self.setter("level", val)
|
self.setter("level", val)
|
||||||
|
|
||||||
|
@ -561,12 +561,12 @@ class Mix:
|
|||||||
self.setter("on", 1 if val else 0)
|
self.setter("on", 1 if val else 0)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@util.from_db
|
@util.db_from
|
||||||
def fader(self) -> float:
|
def fader(self) -> float:
|
||||||
return self.getter("fader")[0]
|
return self.getter("fader")[0]
|
||||||
|
|
||||||
@fader.setter
|
@fader.setter
|
||||||
@util.to_db
|
@util.db_to
|
||||||
def fader(self, val: float):
|
def fader(self, val: float):
|
||||||
self.setter("fader", val)
|
self.setter("fader", val)
|
||||||
|
|
||||||
@ -636,8 +636,8 @@ class Send:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def make(cls, _cls, remote, i, index=None):
|
def make(cls, _cls, remote, i, index=None):
|
||||||
STRIPSEND_cls = type("Send", (cls, _cls), {})
|
SEND_cls = type("Send", (cls, _cls), {})
|
||||||
return STRIPSEND_cls(remote, i, index)
|
return SEND_cls(remote, i, index)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def address(self) -> str:
|
def address(self) -> str:
|
||||||
@ -645,11 +645,11 @@ class Send:
|
|||||||
return f"{root}/mix/{str(self.i).zfill(2)}"
|
return f"{root}/mix/{str(self.i).zfill(2)}"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@util.from_db
|
@util.db_from
|
||||||
def level(self):
|
def level(self):
|
||||||
return self.getter("level")[0]
|
return self.getter("level")[0]
|
||||||
|
|
||||||
@level.setter
|
@level.setter
|
||||||
@util.to_db
|
@util.db_to
|
||||||
def level(self, val):
|
def level(self, val):
|
||||||
self.setter("level", val)
|
self.setter("level", val)
|
||||||
|
@ -18,7 +18,7 @@ def log_set(min, max, val):
|
|||||||
return log(val / min) / log(max / min)
|
return log(val / min) / log(max / min)
|
||||||
|
|
||||||
|
|
||||||
def from_db(func):
|
def db_from(func):
|
||||||
"""fader|level converter for getters"""
|
"""fader|level converter for getters"""
|
||||||
|
|
||||||
@functools.wraps(func)
|
@functools.wraps(func)
|
||||||
@ -41,7 +41,7 @@ def from_db(func):
|
|||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
|
||||||
def to_db(func):
|
def db_to(func):
|
||||||
"""fader|level converter for setters"""
|
"""fader|level converter for setters"""
|
||||||
|
|
||||||
@functools.wraps(func)
|
@functools.wraps(func)
|
||||||
|
Loading…
Reference in New Issue
Block a user