From 9d58a5d0732206ab2b70ca742b6a9d3693281314 Mon Sep 17 00:00:00 2001 From: user Date: Sat, 21 Feb 2026 23:56:04 +0100 Subject: [PATCH] fix: slow volume ramp to 1s for smoother transitions Reduce _max_step from 0.1 to 0.02 per frame, extending the full 0-to-1 volume ramp from ~200ms to ~1 second. --- docs/CHEATSHEET.md | 2 +- docs/USAGE.md | 2 +- src/derp/mumble.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/CHEATSHEET.md b/docs/CHEATSHEET.md index a826011..4cf0023 100644 --- a/docs/CHEATSHEET.md +++ b/docs/CHEATSHEET.md @@ -560,7 +560,7 @@ HTML stripped on receive, escaped on send. IRC-only commands are no-ops. Requires: `yt-dlp`, `ffmpeg`, `libopus` on the host. Max 50 tracks in queue. Playlists auto-expand; excess truncated at limit. -Volume ramps smoothly over ~200ms (no abrupt jumps mid-playback). +Volume ramps smoothly over ~1s (no abrupt jumps mid-playback). Mumble-only: `!play` replies with error on other adapters, others silently no-op. ## Plugin Template diff --git a/docs/USAGE.md b/docs/USAGE.md index f011140..3502530 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -1581,7 +1581,7 @@ and voice transmission. and one is picked randomly - Playlists are expanded into individual tracks; excess tracks are truncated at the queue limit -- Volume changes ramp smoothly over ~200ms (no abrupt jumps) +- Volume changes ramp smoothly over ~1s (no abrupt jumps) - Default volume: 50% - Titles resolved via `yt-dlp --flat-playlist` before playback - Audio pipeline: `yt-dlp | ffmpeg` subprocess, PCM fed to pymumble diff --git a/src/derp/mumble.py b/src/derp/mumble.py index fe686a1..caf5041 100644 --- a/src/derp/mumble.py +++ b/src/derp/mumble.py @@ -475,7 +475,7 @@ class MumbleBot: stderr=asyncio.subprocess.PIPE, ) - _max_step = 0.1 # max volume change per frame (~200ms full ramp) + _max_step = 0.02 # max volume change per frame (~1s full ramp) _cur_vol = _get_vol() frames = 0