Increase analyzer/VU meter bands (32)

This commit is contained in:
Armin 2026-07-08 17:21:30 +02:00
commit 9d82535024

View file

@ -453,7 +453,7 @@ function drawSpectrum() {
}
const sampleRate = audioCtx.sampleRate;
const maxBin = Math.min(binCount, Math.floor(19000 * fftSize / sampleRate));
const NUM_BARS = 24;
const NUM_BARS = 32;
const barMags = new Float32Array(NUM_BARS);
for (let b = 0; b < NUM_BARS; b++) {
const start = 1 + Math.floor(b * (maxBin - 1) / NUM_BARS);
@ -520,7 +520,7 @@ function drawSpectrum() {
const rowH = 6;
const gap = 4;
const labelW = 12;
const segCount = 22;
const segCount = 32;
const segArea = vw - labelW - segCount;
const segW = segArea / segCount;
const segG = 1;