mirror of
https://github.com/onyx-and-iris/xair-api-python.git
synced 2024-11-21 20:31:00 +00:00
mute prop moved into meta
patch bump
This commit is contained in:
parent
a09b07e1c2
commit
ac382c4c32
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "xair-api"
|
||||
version = "2.2.1"
|
||||
version = "2.2.2"
|
||||
description = "Remote control Behringer X-Air | Midas MR mixers through OSC"
|
||||
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
||||
license = "MIT"
|
||||
|
@ -1,6 +1,7 @@
|
||||
import abc
|
||||
|
||||
from .errors import XAirRemoteError
|
||||
from .meta import mute_prop
|
||||
from .shared import EQ, GEQ, Automix, Config, Dyn, Gate, Group, Insert, Mix, Preamp
|
||||
|
||||
|
||||
@ -52,7 +53,8 @@ class Bus(IBus):
|
||||
Mix,
|
||||
Group,
|
||||
)
|
||||
}
|
||||
},
|
||||
"mute": mute_prop(),
|
||||
},
|
||||
)
|
||||
return BUS_cls(remote, index)
|
||||
@ -60,11 +62,3 @@ class Bus(IBus):
|
||||
@property
|
||||
def address(self) -> str:
|
||||
return f"/bus/{self.index}"
|
||||
|
||||
@property
|
||||
def mute(self) -> bool:
|
||||
return not self.mix.on
|
||||
|
||||
@mute.setter
|
||||
def mute(self, val: bool):
|
||||
self.mix.on = not val
|
||||
|
@ -1,6 +1,7 @@
|
||||
import abc
|
||||
|
||||
from .errors import XAirRemoteError
|
||||
from .meta import mute_prop
|
||||
from .shared import EQ, GEQ, Automix, Config, Dyn, Gate, Group, Insert, Mix, Preamp
|
||||
|
||||
|
||||
@ -60,7 +61,8 @@ class FXSend(IFX):
|
||||
f"{_cls.__name__}{remote.kind}", (_cls, cls), {}
|
||||
)(remote, index)
|
||||
for _cls in (Config, Mix, Group)
|
||||
}
|
||||
},
|
||||
"mute": mute_prop(),
|
||||
},
|
||||
)
|
||||
return FXSEND_cls(remote, index)
|
||||
@ -68,11 +70,3 @@ class FXSend(IFX):
|
||||
@property
|
||||
def address(self) -> str:
|
||||
return f"/fxsend/{self.index}"
|
||||
|
||||
@property
|
||||
def mute(self) -> bool:
|
||||
return not self.mix.on
|
||||
|
||||
@mute.setter
|
||||
def mute(self, val: bool):
|
||||
self.mix.on = not val
|
||||
|
@ -2,6 +2,7 @@ import abc
|
||||
from typing import Optional
|
||||
|
||||
from .errors import XAirRemoteError
|
||||
from .meta import mute_prop
|
||||
from .shared import EQ, GEQ, Automix, Config, Dyn, Gate, Group, Insert, Mix, Preamp
|
||||
|
||||
|
||||
@ -54,6 +55,7 @@ class LR(ILR):
|
||||
Mix,
|
||||
)
|
||||
},
|
||||
"mute": mute_prop(),
|
||||
},
|
||||
)
|
||||
return LR_cls(remote, index)
|
||||
@ -61,11 +63,3 @@ class LR(ILR):
|
||||
@property
|
||||
def address(self) -> str:
|
||||
return f"/lr"
|
||||
|
||||
@property
|
||||
def mute(self) -> bool:
|
||||
return not self.mix.on
|
||||
|
||||
@mute.setter
|
||||
def mute(self, val: bool):
|
||||
self.mix.on = not val
|
||||
|
@ -69,3 +69,13 @@ def geq_prop(param):
|
||||
self.setter(param, lin_set(-15, 15, val))
|
||||
|
||||
return property(fget, fset)
|
||||
|
||||
|
||||
def mute_prop():
|
||||
def fget(self):
|
||||
return not self.mix.on
|
||||
|
||||
def fset(self, val):
|
||||
self.mix.on = not val
|
||||
|
||||
return property(fget, fset)
|
||||
|
@ -2,6 +2,7 @@ import abc
|
||||
from typing import Optional
|
||||
|
||||
from .errors import XAirRemoteError
|
||||
from .meta import mute_prop
|
||||
from .shared import EQ, GEQ, Automix, Config, Dyn, Gate, Group, Insert, Mix, Preamp
|
||||
|
||||
|
||||
@ -50,7 +51,8 @@ class AuxRtn(IRtn):
|
||||
Mix,
|
||||
Group,
|
||||
)
|
||||
}
|
||||
},
|
||||
"mute": mute_prop(),
|
||||
},
|
||||
)
|
||||
return AUXRTN_cls(remote, index)
|
||||
@ -59,14 +61,6 @@ class AuxRtn(IRtn):
|
||||
def address(self):
|
||||
return "/rtn/aux"
|
||||
|
||||
@property
|
||||
def mute(self) -> bool:
|
||||
return not self.mix.on
|
||||
|
||||
@mute.setter
|
||||
def mute(self, val: bool):
|
||||
self.mix.on = not val
|
||||
|
||||
|
||||
class FxRtn(IRtn):
|
||||
"""Concrete class for rtn"""
|
||||
@ -93,7 +87,8 @@ class FxRtn(IRtn):
|
||||
Mix,
|
||||
Group,
|
||||
)
|
||||
}
|
||||
},
|
||||
"mute": mute_prop(),
|
||||
},
|
||||
)
|
||||
return FXRTN_cls(remote, index)
|
||||
@ -101,11 +96,3 @@ class FxRtn(IRtn):
|
||||
@property
|
||||
def address(self):
|
||||
return f"/rtn/{self.index}"
|
||||
|
||||
@property
|
||||
def mute(self) -> bool:
|
||||
return not self.mix.on
|
||||
|
||||
@mute.setter
|
||||
def mute(self, val: bool):
|
||||
self.mix.on = not val
|
||||
|
@ -1,6 +1,7 @@
|
||||
import abc
|
||||
|
||||
from .errors import XAirRemoteError
|
||||
from .meta import mute_prop
|
||||
from .shared import EQ, GEQ, Automix, Config, Dyn, Gate, Group, Insert, Mix, Preamp
|
||||
|
||||
|
||||
@ -35,6 +36,7 @@ class Strip(IStrip):
|
||||
|
||||
Returns a Strip class of a kind.
|
||||
"""
|
||||
|
||||
STRIP_cls = type(
|
||||
f"Strip{remote.kind}",
|
||||
(cls,),
|
||||
@ -55,6 +57,7 @@ class Strip(IStrip):
|
||||
Automix,
|
||||
)
|
||||
},
|
||||
"mute": mute_prop(),
|
||||
},
|
||||
)
|
||||
return STRIP_cls(remote, index)
|
||||
@ -62,11 +65,3 @@ class Strip(IStrip):
|
||||
@property
|
||||
def address(self) -> str:
|
||||
return f"/ch/{str(self.index).zfill(2)}"
|
||||
|
||||
@property
|
||||
def mute(self) -> bool:
|
||||
return not self.mix.on
|
||||
|
||||
@mute.setter
|
||||
def mute(self, val: bool):
|
||||
self.mix.on = not val
|
||||
|
Loading…
Reference in New Issue
Block a user