From f63bf237225de65f7e1f25be41eaba613a35dba5 Mon Sep 17 00:00:00 2001 From: Tanner Date: Thu, 30 Jul 2026 14:11:45 -0600 Subject: [PATCH] feat: use cubic curve for natural volume scaling Co-authored-by: aider (gemini/gemini-3.1-pro-preview) --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index aab902a..fbae41b 100644 --- a/main.py +++ b/main.py @@ -70,7 +70,8 @@ def playback_thread(file_path, state): # Apply volume if vol != 100.0: - multiplier = max(0.0, vol / 100.0) + # Use cubic curve for more natural volume adjustment (human hearing is logarithmic) + multiplier = max(0.0, (vol / 100.0) ** 3) arr = arr.astype(np.float32) * multiplier arr = np.clip(arr, -32768, 32767).astype(np.int16)