From 18bcb192aba62dd2a73bfa78ee60f48d1b7867c5 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Mar 2026 12:56:28 +0000 Subject: [PATCH] Fix classical playability: louder orchestra, no stacked notes Three fixes for classical mode: 1. Louder background orchestra: bg volume boosted 1.5x in beginClassical so the full orchestra is clearly audible during gameplay, not drowned out by hit sounds 2. No more impossible stacked notes: buildClassicalNotes now enforces a 0.12s minimum gap between consecutive hittable notes. This removes physically impossible simultaneous hits while keeping 94-100% of notes in most pieces. Flight of the Bumblebee goes from 206 to 140 notes (still 4 notes/sec). 3. Balanced hit volumes: drum hits during classical mode reduced from gain 8 to gain 3 so they don't overpower the orchestra. Orchestra hit sounds boosted (strings 0.7, brass 0.4). Miss feedback reduced to gain 2. https://claude.ai/code/session_01GdFrFqAe9e2DaJ86jZPEZE --- index.html | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 09bf13e..56c508f 100644 --- a/index.html +++ b/index.html @@ -1429,7 +1429,7 @@ const CLASSICAL_PIECES=(function(){ })(); function buildClassicalNotes(piece){ - return piece.melody.filter(function(m){return activePads[m.l];}) + var raw=piece.melody.filter(function(m){return activePads[m.l];}) .map(function(m){ // Find matching frequency from background notes at same time var freq=261.63; // default C4 @@ -1440,6 +1440,16 @@ function buildClassicalNotes(piece){ return{time:m.t,lane:m.l,freq:freq,hit:false,missed:false}; }) .sort(function(a,b){return a.time-b.time;}); + // Enforce minimum gap between notes so stacked/simultaneous notes are playable + // Without this, fast passes create 2-3 notes within 0.07s on different lanes + var MIN_GAP=0.12; + var result=[],lastTime=-1; + for(var i=0;i=MIN_GAP){ + result.push(raw[i]);lastTime=raw[i].time; + } + } + return result; } function beginClassical(){ @@ -1449,7 +1459,7 @@ function beginClassical(){ gameStartTime=ac.currentTime+0.15; for(var i=0;ilaneFlash[lane]=0,120); if(!playing)return; @@ -1705,15 +1717,15 @@ function triggerPad(lane){ // Play orchestral hit sound for classical mode if(isClassicalOrch&&best.freq){ var ac=getAc(),ct=ac.currentTime; - playSynth(ac,best.freq,ct,0.3,'strings',0.5,[]); - playSynth(ac,best.freq,ct,0.3,'brass',0.3,[]); + playSynth(ac,best.freq,ct,0.35,'strings',0.7,[]); + playSynth(ac,best.freq,ct,0.35,'brass',0.4,[]); } else if(isClassicalOrch){ - playDrumAt(getAc(),lane,getAc().currentTime,8,[]); + playDrumAt(getAc(),lane,getAc().currentTime,3,[]); } showMsg(bestD<0.05?"PERFECT!":"GOOD",bestD<0.05?"#68d391":"#d69e2e"); } else { - // Miss — play drum sound as feedback even in orchestra mode - if(isClassicalOrch)playDrumAt(getAc(),lane,getAc().currentTime,4,[]); + // Miss — quiet drum thud as feedback + if(isClassicalOrch)playDrumAt(getAc(),lane,getAc().currentTime,2,[]); cStreak=0;showMsg("MISS","#fc8181"); } updateHud();