play.py: reduce log compression on spectrum (50→15) for more contrast

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-04 01:38:02 -04:00
parent dc8e9627d7
commit 1dd53ac8c0
+1 -1
View File
@@ -349,7 +349,7 @@ def play_audio(buf, sample_rate, title="", info_lines=None, offset_sec=0.0):
hi = lo + 1
bands.append(np.mean(fft[lo:hi]))
# Log scale — human hearing is logarithmic
bands = [np.log1p(b * 50) for b in bands]
bands = [np.log1p(b * 15) for b in bands]
peak = max(bands) if max(bands) > 0 else 1
# Multi-row spectrum: map each band to 0..n_rows*4 height
max_h = n_rows * 4