Show GN: A game gayageum synthesized from code, with a browser demo
A solo developer describes how the mobile parrying game 선비검객 synthesizes its gayageum music and sound effects at runtime with Web Audio, without audio files. A browser demo lets visitors inspect the instrument using the game’s own code.
The strings use Karplus–Strong synthesis[1], with a first-order all-pass filter[2] adding fractional delay to fix pitch problems at high notes. For a silk-string tone, noise passes through an averaging filter twice, then a comb filter[3] at 1/7 of the string’s length; a 260Hz peaking EQ and a 4.2kHz low-pass filter shape the resonance.
Each string is rendered once into an AudioBuffer and reused; vibrato and pitch bends use playbackRate automation. Music and parry effects share a Pyeongjo scale function[4], while a composer creates 12-beat melodies and retries if a similar pattern appears within 60 seconds. Events are scheduled 0.4 seconds ahead using AudioContext.currentTime to keep the beat steady during hit-stop, and code-drawn brush art helps keep the whole app at 13MB.
Read the original news.hada.io
Sources
-
KRGeekNews KO
Show GN: 오디오 파일 없이 코드로 합성한 게임 속 가야금 (브라우저 데모)


