Get started with ZzFX CDN

MIT licensed

ZzFX is a compact library for generating retro-style sound effects.

Tags:
  • sound
  • sounds
  • sound effect
  • sound effect engine
  • sound system
  • music
  • musical note
  • play sounds

Stable version

Copied!

How to start using ZzFX CDN


<!DOCTYPE html>
<html>
<head>
    <title>Get started with ZzFX CDN - cdnhub.io</title>
    <script src="https://cdn.cdnhub.io/ZzFX/2.29/ZzFX.micro.js"></script>
</head>
<body>
    <button id="play">Play</button>
    <script>
        const playBtn = document.getElementById('play');
        const zzfx = new ZzFX();

        playBtn.addEventListener('click', () => {
            zzfx.masterGain.value = 0.5; // Set master gain to 0.5
            zzfx.play('sfx_explosion_01.wav'); // Play an explosion sound effect
        });
    </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!

All versions