mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2025-06-26 22:30:24 +01:00
add StripEQCh, StripEQChCell, they extend the StripEQ class.
update the kind maps
This commit is contained in:
parent
15f0fcda69
commit
feb6ee5821
@ -95,13 +95,12 @@ class BusEQ(IRemote):
|
||||
|
||||
Returns a BusEQ class.
|
||||
"""
|
||||
kls = (cls,)
|
||||
BusEQ_cls = type(
|
||||
'BusEQ',
|
||||
kls,
|
||||
(cls,),
|
||||
{
|
||||
'channel': tuple(
|
||||
BusEQCh.make(remote, i, j) for j in range(remote.kind.channels)
|
||||
BusEQCh.make(remote, i, j) for j in range(remote.kind.bus_channels)
|
||||
)
|
||||
},
|
||||
)
|
||||
@ -136,10 +135,9 @@ class BusEQCh(IRemote):
|
||||
|
||||
Returns a BusEQCh class.
|
||||
"""
|
||||
kls = (cls,)
|
||||
BusEQCh_cls = type(
|
||||
'BusEQCh',
|
||||
kls,
|
||||
(cls,),
|
||||
{
|
||||
'cell': tuple(
|
||||
BusEQChCell(remote, i, j, k) for k in range(remote.kind.cells)
|
||||
|
@ -31,7 +31,8 @@ class KindMapClass(metaclass=SingletonType):
|
||||
asio: tuple
|
||||
insert: int
|
||||
composite: int
|
||||
channels: int
|
||||
strip_channels: int
|
||||
bus_channels: int
|
||||
cells: int
|
||||
|
||||
@property
|
||||
@ -78,7 +79,8 @@ class BasicMap(KindMapClass):
|
||||
asio: tuple = (0, 0)
|
||||
insert: int = 0
|
||||
composite: int = 0
|
||||
channels: int = 0
|
||||
strip_channels: int = 0
|
||||
bus_channels: int = 0
|
||||
cells: int = 0
|
||||
|
||||
|
||||
@ -90,7 +92,8 @@ class BananaMap(KindMapClass):
|
||||
asio: tuple = (6, 8)
|
||||
insert: int = 22
|
||||
composite: int = 8
|
||||
channels: int = 8
|
||||
strip_channels: int = 0
|
||||
bus_channels: int = 8
|
||||
cells: int = 6
|
||||
|
||||
|
||||
@ -102,7 +105,8 @@ class PotatoMap(KindMapClass):
|
||||
asio: tuple = (10, 8)
|
||||
insert: int = 34
|
||||
composite: int = 8
|
||||
channels: int = 8
|
||||
strip_channels: int = 2
|
||||
bus_channels: int = 8
|
||||
cells: int = 6
|
||||
|
||||
|
||||
|
@ -96,7 +96,7 @@ class PhysicalStrip(Strip):
|
||||
'comp': StripComp(remote, i),
|
||||
'gate': StripGate(remote, i),
|
||||
'denoiser': StripDenoiser(remote, i),
|
||||
'eq': StripEQ(remote, i),
|
||||
'eq': StripEQ.make(remote, i),
|
||||
'device': StripDevice.make(remote, i),
|
||||
},
|
||||
)
|
||||
@ -268,6 +268,25 @@ class StripDenoiser(IRemote):
|
||||
|
||||
|
||||
class StripEQ(IRemote):
|
||||
@classmethod
|
||||
def make(cls, remote, i):
|
||||
"""
|
||||
Factory method for Strip EQ.
|
||||
|
||||
Returns a StripEQ class.
|
||||
"""
|
||||
STRIPEQ_cls = type(
|
||||
'StripEQ',
|
||||
(cls,),
|
||||
{
|
||||
'channel': tuple(
|
||||
StripEQCh.make(remote, i, j)
|
||||
for j in range(remote.kind.strip_channels)
|
||||
)
|
||||
},
|
||||
)
|
||||
return STRIPEQ_cls(remote, i)
|
||||
|
||||
@property
|
||||
def identifier(self) -> str:
|
||||
return f'Strip[{self.index}].eq'
|
||||
@ -289,6 +308,85 @@ class StripEQ(IRemote):
|
||||
self.setter('ab', 1 if val else 0)
|
||||
|
||||
|
||||
class StripEQCh(IRemote):
|
||||
@classmethod
|
||||
def make(cls, remote, i, j):
|
||||
"""
|
||||
Factory method for Strip EQ channel.
|
||||
|
||||
Returns a StripEQCh class.
|
||||
"""
|
||||
StripEQCh_cls = type(
|
||||
'StripEQCh',
|
||||
(cls,),
|
||||
{
|
||||
'cell': tuple(
|
||||
StripEQChCell(remote, i, j, k) for k in range(remote.kind.cells)
|
||||
)
|
||||
},
|
||||
)
|
||||
return StripEQCh_cls(remote, i, j)
|
||||
|
||||
def __init__(self, remote, i, j):
|
||||
super().__init__(remote, i)
|
||||
self.channel_index = j
|
||||
|
||||
@property
|
||||
def identifier(self) -> str:
|
||||
return f'Strip[{self.index}].eq.channel[{self.channel_index}]'
|
||||
|
||||
|
||||
class StripEQChCell(IRemote):
|
||||
def __init__(self, remote, i, j, k):
|
||||
super().__init__(remote, i)
|
||||
self.channel_index = j
|
||||
self.cell_index = k
|
||||
|
||||
@property
|
||||
def identifier(self) -> str:
|
||||
return f'Strip[{self.index}].eq.channel[{self.channel_index}].cell[{self.cell_index}]'
|
||||
|
||||
@property
|
||||
def on(self) -> bool:
|
||||
return self.getter('on') == 1
|
||||
|
||||
@on.setter
|
||||
def on(self, val: bool):
|
||||
self.setter('on', 1 if val else 0)
|
||||
|
||||
@property
|
||||
def type(self) -> int:
|
||||
return int(self.getter('type'))
|
||||
|
||||
@type.setter
|
||||
def type(self, val: int):
|
||||
self.setter('type', val)
|
||||
|
||||
@property
|
||||
def f(self) -> float:
|
||||
return round(self.getter('f'), 1)
|
||||
|
||||
@f.setter
|
||||
def f(self, val: float):
|
||||
self.setter('f', val)
|
||||
|
||||
@property
|
||||
def gain(self) -> float:
|
||||
return round(self.getter('gain'), 1)
|
||||
|
||||
@gain.setter
|
||||
def gain(self, val: float):
|
||||
self.setter('gain', val)
|
||||
|
||||
@property
|
||||
def q(self) -> float:
|
||||
return round(self.getter('q'), 1)
|
||||
|
||||
@q.setter
|
||||
def q(self, val: float):
|
||||
self.setter('q', val)
|
||||
|
||||
|
||||
class StripDevice(IRemote):
|
||||
@classmethod
|
||||
def make(cls, remote, i):
|
||||
|
Loading…
x
Reference in New Issue
Block a user