From Web Game Builder
ChipAudio로 **8비트(칩튠) 경량** 효과음과 BGM을 코드 합성(CC0, 오리지널)합니다 — 아주 작은/레트로 게임이나 사운드가 부차적일 때의 경량 레인(T0). 8비트를 넘어 장르·무드에 맞는 풍부한 BGM/적응형 음악·레이어드 SFX가 필요하면 디렉터 스킬 `sound-architect`(engine/soundforge.js, Tone.js)를 쓴다. 단순 8비트 효과음/배경음 추가·수정 요청 시 사용. sound, SFX, BGM, music, audio, 점프음, 효과음, 8비트, 칩튠, chiptune.
How this skill is triggered — by the user, by Claude, or both
Slash command
/web-game-builder:wgf-chip-soundThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Web Audio만으로 8비트 효과음과 BGM을 합성한다. 오디오 파일 없이 CC0/오리지널 사운드만 생성한다. web-game-builder의 전문 스킬. `engine/audio.js`를 사용한다.
Web Audio만으로 8비트 효과음과 BGM을 합성한다. 오디오 파일 없이 CC0/오리지널 사운드만 생성한다. web-game-builder의 전문 스킬. engine/audio.js를 사용한다.
이 스킬은 8비트 경량 레인(T0)이다. 아주 작은/레트로 게임이나 사운드가 부차적일 때 쓴다. 8비트 구조 자체의 한계를 넘어 장르·무드에 어울리는 풍부한 BGM·적응형 레이어드 음악·트랜지언트/바디/테일 레이어드 SFX가 필요하면 디렉터 스킬
sound-architect(engine/soundforge.js= Tone.js v15 래퍼)를 쓴다. sound-architect가 무드 인터뷰로 사운드를 설계하는 상위 디렉터, chip-sound는 그 아래 8비트 구현 레인이다.
var GAME_AUDIO = new ChipAudio();
window.GAME_AUDIO = GAME_AUDIO; // mobile.js 음소거 버튼이 이 전역 참조
iOS/Android 웹뷰는 사용자 제스처 없이 AudioContext를 재생할 수 없다. Title 씬의 'Tap to start' 핸들러에서 반드시 호출한다.
// TitleScene — 첫 pointerdown / keydown 콜백
GAME_AUDIO.unlock(); // suspended 컨텍스트 resume + iOS 무음버퍼 언락
GAME_AUDIO.startBgm(); // 언락 직후 BGM 시작
// 내장 키: jump, coin, stomp, bump, brick, powerup, sprout, die, flag, 1up
GAME_AUDIO.sfx('jump');
GAME_AUDIO.sfx('coin');
GAME_AUDIO.sfx('stomp');
tone()으로 주파수 슬라이드·포락선을 조합해 독특한 SFX를 만든다.
// 레이저 발사음: 고음 → 저음 슬라이드
GAME_AUDIO.tone({ freq: 880, to: 220, dur: 0.18, type: 'square', vol: 0.25 });
// 폭발음: 낮은 노이즈 느낌 (sawtooth 저음)
GAME_AUDIO.tone({ freq: 80, dur: 0.3, type: 'sawtooth', vol: 0.35 });
// 아이템 획득: 상승 글리산도
GAME_AUDIO.tone({ freq: 440, to: 880, dur: 0.12, type: 'triangle', vol: 0.3 });
// delay로 화음처럼 겹치기
GAME_AUDIO.tone({ freq: 550, to: 1100, dur: 0.12, type: 'triangle', vol: 0.2, delay: 0.05 });
ChipAudio 내부 BGM은 음표 배열(주파수 + 박자)로 구성된 스텝 시퀀서다.
audio.js 내 BGM_MELODY 배열을 교체해 오리지널 멜로디를 만든다.
// audio.js 내 BGM_MELODY 수정 예시 (Hz, 박자(초))
// 완전히 오리지널 멜로디만 — 기존 게임 음악 절대 인용 금지
var BGM_MELODY = [
[330, 0.12], [392, 0.12], [440, 0.12], [494, 0.25],
[440, 0.12], [392, 0.12], [330, 0.25], [0, 0.12],
[294, 0.12], [330, 0.12], [370, 0.12], [392, 0.25],
[330, 0.12], [294, 0.12], [262, 0.5], [0, 0.12],
];
// 3음 상승 아르페지오 파워업 효과음
function sfxPowerupCustom() {
var notes = [330, 440, 554];
notes.forEach(function (freq, i) {
GAME_AUDIO.tone({
freq: freq,
to: freq * 1.05,
dur: 0.1,
type: 'triangle',
vol: 0.28,
delay: i * 0.08
});
});
}
// 적 처치 - 짧은 드롭 톤
function sfxDefeat() {
GAME_AUDIO.tone({ freq: 440, to: 110, dur: 0.25, type: 'square', vol: 0.3 });
}
// 게임오버 - 느린 하강 멜로디
function sfxGameOver() {
[[494, 0], [440, 0.18], [370, 0.36], [294, 0.54]].forEach(function (n) {
GAME_AUDIO.tone({ freq: n[0], dur: 0.3, type: 'square', vol: 0.25, delay: n[1] });
});
}
reference/engine-api.md. IP-safe(라이선스 안전·절차).MobileHarness.installDomGuards() 가 탭이 가려지면 GAME_AUDIO.suspend()(BGM 정지+ctx suspend), 복귀하면 resume()(BGM 자동 재가동)을 호출 → 백그라운드/탭 이탈 시 소리가 계속 나지 않는다(서버를 내려도 무관). 커스텀은 MobileHarness.onHide/onResume(fn).window.GAME_AUDIO.toggleMute()로 토글.npx claudepluginhub v0o0v/web-game-forge --plugin web-game-builderCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.