Звуковые эффекты для игр — встроенные пресеты

10 готовых пресетов для игрового звука. Нажмите на любую карточку, чтобы прослушать. Одна строка кода = один звуковой эффект.

💥
Лазер
Пиу-пиу! Классический луч
playPreset('laser')
🪙
Монета
Собери это золото!
playPreset('coin')
🏃
Прыжок
Прыгающий платформер
playPreset('jump')
💣
Взрыв
Громкий взрыв
playPreset('explosion')
Бонус
Увеличение уровня
playPreset('powerup')
💢
Попадание
Урон от удара врага
playPreset('hit')
💬
Сигнал
Курсор меню / щелчок по интерфейсу
playPreset('blip')
🔊
Бас
Глубокий треугольный удар
playPreset('bass')
🔫
Выстрел
Выстрел с быстрой стрельбой
playPreset('shoot')
💚
1-UP
Фанфары дополнительной жизни
playPreset('1up')
Комбо — цепочка из нескольких звуковых эффектов
// 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);
Быстрый 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