only add fx properties to phys strips

patch bump
This commit is contained in:
onyx-and-iris 2022-10-27 08:50:27 +01:00
parent caf05aa789
commit a73ebf364b
2 changed files with 25 additions and 25 deletions

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "voicemeeter-api"
version = "0.9.1"
version = "0.9.2"
description = "A Python wrapper for the Voiceemeter API"
authors = ["onyx-and-iris <code@onyxandiris.online>"]
license = "MIT"

View File

@ -377,20 +377,15 @@ def _make_effects_mixin(kind, is_phys):
{**pan},
)
XY_cls = _make_xy_cls()
FX_cls = type(
def _make_fx_cls():
if is_phys:
return type(
"FX",
(),
{
**{
param: float_prop(param)
for param in [
"reverb",
"delay",
"fx1",
"fx2",
]
for param in ["reverb", "delay", "fx1", "fx2"]
},
**{
f"post{param}": bool_prop(f"post{param}")
@ -398,10 +393,15 @@ def _make_effects_mixin(kind, is_phys):
},
},
)
return type("FX", (), {})
if kind.name == "potato":
return type(f"Effects{kind}", (XY_cls, FX_cls), {})
return type(f"Effects{kind}", (XY_cls,), {})
if kind.name == "basic":
steps = (_make_xy_cls,)
elif kind.name == "banana":
steps = (_make_xy_cls,)
elif kind.name == "potato":
steps = (_make_xy_cls, _make_fx_cls)
return type(f"Effects{kind}", tuple(step() for step in steps), {})
def _make_effects_mixins(is_phys):