From fc2c0000af4009d114c908411eb8cfd36f14b53f Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Mon, 3 Aug 2026 17:04:19 -0600 Subject: Fix clipped/jagged simulated Arduino waveforms amp+offset spanned the full [0,5] clamp range edge-to-edge, so per-sample noise pushed past the rails on every peak/trough and got hard-clamped into a flat plateau. Shrinking amp gives ~8.7 sigma of headroom so the clamp stays a safety net instead of firing every cycle. Co-Authored-By: Claude Sonnet 5 --- api_layers/arduino_layer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api_layers/arduino_layer.py') diff --git a/api_layers/arduino_layer.py b/api_layers/arduino_layer.py index 88a2655..52eeb30 100644 --- a/api_layers/arduino_layer.py +++ b/api_layers/arduino_layer.py @@ -121,7 +121,7 @@ class ArduinoLayer: self._sim_params = { pin: { "freq": 0.1 + i * 0.13, - "amp": 2.5, + "amp": 2.3, # headroom below the [0,5] clamp so noise doesn't flat-clip every peak "offset": 2.5, "noise": 0.01, "phase": i * 1.1, -- cgit v1.2.3