We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b70817 commit 50d8438Copy full SHA for 50d8438
music_assistant_models/dsp.py
@@ -68,11 +68,14 @@ class ParametricEQBand(DataClassDictMixin):
68
class ParametricEQFilter(DSPFilterBase):
69
"""Model for a Parametric EQ filter."""
70
71
+ preamp: float | None = 0.0
72
type: Literal[DSPFilterType.PARAMETRIC_EQ] = DSPFilterType.PARAMETRIC_EQ
73
bands: list[ParametricEQBand] = field(default_factory=list)
74
75
def validate(self) -> None:
76
"""Validate the Parametric EQ filter."""
77
+ if self.preamp and (not -60.0 <= self.preamp <= 60.0):
78
+ raise ValueError("Preamp must be in the range -60.0 to 60.0 dB")
79
# Validate bands
80
for band in self.bands:
81
if not 0.0 < band.frequency <= 100000.0:
0 commit comments