fix: real VU meter levels from pipeline instead of random animation

- Added input_level and output_level to /api/state (scaled 0-100)
- React RigScreen now reads real levels from state instead of random walk
- When no audio flows, VU meters show flat (0) instead of fake animation
This commit is contained in:
2026-06-12 17:09:49 -04:00
parent 32690c293e
commit 7498ad55fc
4 changed files with 13 additions and 16 deletions
+5
View File
@@ -1023,6 +1023,8 @@ class WebServer:
"nam_model": None,
"ir_loaded": False,
"ir_name": None,
"input_level": 0,
"output_level": 0,
"wifi": {},
"bluetooth": {},
}
@@ -1065,6 +1067,9 @@ class WebServer:
"nam_model": current_model_name,
"ir_loaded": bool(ir and ir.is_loaded) if ir else False,
"ir_name": current_ir_name,
# Audio levels from pipeline (RMS float32 normalized 0.0-1.0, scaled to 0-100)
"input_level": min(100, round((pl._input_level or 0.0) * 150)) if pl else 0,
"output_level": min(100, round((pl._output_level or 0.0) * 150)) if pl else 0,
"wifi": self._gather_wifi_state(),
"bluetooth": self._gather_bt_state(),
}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/ui/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pi Multi-FX Pedal</title>
<script type="module" crossorigin src="/ui/assets/index-3XaYhUGn.js"></script>
<script type="module" crossorigin src="/ui/assets/index-By7LnVlV.js"></script>
<link rel="stylesheet" crossorigin href="/ui/assets/index-CuJgR-s6.css">
</head>
<body>