メインデモ
CDN v3.0.0

これら2つのタグをページに追加 — </body> またはに <head> :

シンセエンジン
<script src="https://cdn.chiptune-synth.8binami.com/3.0.0/chiptune-synth.min.js"></script>
サウンドフォント (170+ instruments)
<script src="https://cdn.chiptune-synth.8binami.com/3.0.0/chiptune-sound-font.min.js"></script>
ゲームサウンドエフェクト — 内蔵プリセット

10種のゲームオーディオプリセット。カードをクリックして聴く。コード1行=1つのサウンドエフェクト。

💥
レーザー
Pew pew! Classic beam
playPreset('laser')
🪙
コイン
Collect that gold!
playPreset('coin')
🏃
ジャンプ
Bouncy platformer hop
playPreset('jump')
💣
爆発
Big boom noise burst
playPreset('explosion')
Power-Up
Level up rising sweep
playPreset('powerup')
💢
ヒット
Enemy damage impact
playPreset('hit')
💬
ブリップ
Menu cursor / UI click
playPreset('blip')
🔊
ベース
Deep triangle thump
playPreset('bass')
🔫
シュート
Rapid fire zap shot
playPreset('shoot')
💚
1-UP
Extra life fanfare
playPreset('1up')
コンボ — 複数のSFXを連結
// Coin rush — rapid fire coins
for (let i = 0; i < 5; i++)
    setTimeout(() => synth.playPreset('coin'), i * 120);

// Battle: shoot → hit → explosion
synth.playPreset('shoot');
setTimeout(() => synth.playPreset('hit'), 200);
setTimeout(() => synth.playPreset('explosion'), 450);
Quick API
const synth = new ChiptuneSynth();
await synth.init();

// Play any built-in preset
synth.playPreset('laser');
synth.playPreset('coin');
synth.playPreset('explosion');

// Get all preset names
const names = ChiptuneSynth.getPresetNames();
// ['laser','coin','jump','explosion','powerup','hit','blip','bass','shoot','1up']

// Load preset params without playing
synth.loadPreset('powerup');
提供: 8Binami