From 3dedd4a44d885d7e0929943b7ceca9b8e19b1f56 Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Thu, 30 Apr 2026 10:48:24 -0700 Subject: [PATCH] =?UTF-8?q?fedac/native/audio.c:=20bump=20piano=20sample?= =?UTF-8?q?=20amp=201.8=20=E2=86=92=203.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Piano voice was still noticeably quieter than sine/square at the same notepat `volume` — the Salamander samples sit several dB below the ±1 oscillators and 1.8× wasn't enough headroom recovery. Match harp's boosted philosophy (LPF + stretch attenuates the loop, so it gets 2.5×) and let soft_clip catch any peak excess. Co-Authored-By: Claude Opus 4.7 (1M context) --- fedac/native/src/audio.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fedac/native/src/audio.c b/fedac/native/src/audio.c index 4cf53fb88d..852d2e8fda 100644 --- a/fedac/native/src/audio.c +++ b/fedac/native/src/audio.c @@ -3158,7 +3158,12 @@ uint64_t audio_synth(ACAudio *audio, WaveType type, double freq, // correction is needed beyond the pitch ratio. double semis = target_midi_d - (double)anchor->midi; v->piano_sample_step = pow(2.0, semis / 12.0); - v->piano_sample_amp = 1.8; + // Salamander samples sit several dB below the ±1 oscillators + // (recorded with headroom across velocity layers), so a bare + // pass-through reads quieter than sine/square at the same + // notepat `volume`. 3.0× brings perceived loudness in line + // with the basic waves; soft_clip absorbs any peak excess. + v->piano_sample_amp = 3.0; ac_log("[piano] f0=%.1fHz midi=%d → anchor midi=%d step=%.4f len=%d\n", f0, target_midi, anchor->midi, v->piano_sample_step, anchor->len); -- 2.54.0