From d860aa61e53d62a3753275b17fc2a0ee5392f460 Mon Sep 17 00:00:00 2001 From: Moepchi Date: Fri, 23 Oct 2026 18:06:23 +0000 Subject: [PATCH] Softer test tone Half the volume, with a fade in and decay instead of hard edges. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU --- web/src/voice.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web/src/voice.ts b/web/src/voice.ts index 299dc14..dab5922 100644 --- a/web/src/voice.ts +++ b/web/src/voice.ts @@ -451,12 +451,15 @@ export class AudioPlayer { osc.type = "sine"; osc.frequency.value = 440; const toneGain = this.context.createGain(); - toneGain.gain.value = 0.3; + const now = this.context.currentTime; + // Soft fade in and decay instead of a flat, hard-edged beep. + toneGain.gain.setValueAtTime(0, now); + toneGain.gain.linearRampToValueAtTime(0.15, now + 0.03); + toneGain.gain.exponentialRampToValueAtTime(0.0001, now + 0.8); osc.connect(toneGain); toneGain.connect(this.gain); - const now = this.context.currentTime; osc.start(now); - osc.stop(now + 0.6); + osc.stop(now + 0.85); osc.onended = () => { osc.disconnect(); toneGain.disconnect();