Unbound slope width

pull/403/head
nyanpasu64 2022-03-10 06:36:27 -08:00
rodzic b4e2e0248d
commit ec8886fb23
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -359,7 +359,7 @@ class MainWindow(QWidget):
name="trigger__slope_width",
):
s.widget.setMinimum(0)
s.widget.setMaximum(0.5)
s.widget.setMaximum(2)
s.widget.setSingleStep(0.02)
with append_widget(

Wyświetl plik

@ -305,7 +305,7 @@ class CorrelationTriggerConfig(
def __attrs_post_init__(self) -> None:
MainTriggerConfig.__attrs_post_init__(self)
validate_param(self, "slope_width", 0, 0.5)
# Don't validate slope_width.
validate_param(self, "responsiveness", 0, 1)
# TODO trigger_falloff >= 0
@ -416,7 +416,8 @@ class CorrelationTrigger(MainTrigger):
cfg = self.cfg
if cfg.slope_strength:
slope_width = max(iround(cfg.slope_width * period), 1)
# noinspection PyTypeChecker
slope_width: float = np.clip(cfg.slope_width * period, 1.0, self.A / 3)
slope_strength = cfg.slope_strength * cfg.buffer_falloff
slope_finder = np.empty(self.A + self.B, dtype=f32) # type: np.ndarray[f32]