/** 쿼리도 소리: 나무 말과 나무 벽. Short and soft; the site volume is applied by feedback.ts. */ import { noise, sfx, tone } from '../../lib/feedback'; /** When the jump sound lands (ms), matching the hop animation in index.tsx. */ export const JUMP_LAND_MS = 250; /** A soft wooden "tok" (one pawn step). */ function tok(delay = 0, gain = 0.14): void { tone(560, 55, 'triangle', gain, delay); noise(26, gain * 0.45, delay, 'bandpass', 1500, 1.6); } export const qdSound = { /** Pawn moved one cell. */ step: () => tok(), /** Pawn jumped over another: a little hop up, then the tok on landing. */ jump: () => { tone(360, 150, 'sine', 0.07, 0, { slideTo: 720 }); tok(JUMP_LAND_MS, 0.15); }, /** Wall set into the groove: lower and firmer than a pawn, with a short knock as it settles. */ wall: () => { noise(45, 0.16, 0, 'bandpass', 850, 1.3); tone(190, 95, 'triangle', 0.17); tone(300, 40, 'square', 0.025, 4); noise(35, 0.07, 75, 'lowpass', 650); }, /** A wall that cannot go there (subtle). */ refuse: () => tone(175, 120, 'triangle', 0.08, 0, { slideTo: 125 }), /** A pawn reached its goal line: a short rising run (the win/lose jingle is played by the room). */ goal: (delay = 0) => [523, 659, 784, 1046].forEach((f, i) => tone(f, 120, 'triangle', 0.08, delay + 60 + i * 65)), /** Moves taken back (무르기). */ undo: () => sfx.whoosh(), };