# ZzFX — card for AI agents

Tiny JavaScript sound effects generator (under 1 KB compressed) for games; one zzfx(...) call plays a sound, with a web designer to make new ones and save them as WAV.

Category: Sound effects · maker Frank Force (KilledByAPixel) · checked 2026-11-07

## Price
- Price: Free
- Free tier: Free and open source (MIT).

## License
MIT — https://github.com/KilledByAPixel/ZzFX/blob/master/LICENSE

- commercial: **yes** (Commercial use OK)
  > Open Source: MIT licensed, use it anywhere!
  (https://github.com/KilledByAPixel/ZzFX)
- attribution: **no** (No credit needed)
- in app: **yes** (Can ship inside your app)
- redistribute: **yes** (Can pass the files on to your own users)
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction
  (https://github.com/KilledByAPixel/ZzFX/blob/master/LICENSE)
- youtube: **yes** (OK in monetized YouTube videos)

## Rules to follow
- Keep the MIT copyright and permission notice with the ZzFX code you ship.

## Can an AI agent use it by itself?
**Yes** · package: Agent installs a package or loads it from a CDN

## How an agent gets files
- npm install zzfx, then import {zzfx} from 'zzfx' and call zzfx(...params); or copy ZzFX.js from the repository. (sign-in: none)
- Not allowed: Keep the MIT notice with the code

## How to connect
- Package (npm/PyPI)
- npm: `npm install zzfx`
- Repository: https://github.com/KilledByAPixel/ZzFX
- Website: https://github.com/KilledByAPixel/ZzFX

## Notes
Sounds are parameter lists, so an agent can write them straight into game code; the designer at killedbyapixel.github.io/ZzFX tunes them. npm zzfx 1.4.0; repo active (pushed 2026-11-03).

## Numbers (AgentGid data)
- Gid Score: 27
- GitHub stars: 816
- Downloads last week: 11,795

## Lines to paste into your prompt or AGENTS.md

```
- ZzFX (Sound effects). Tiny JavaScript sound effects generator (under 1 KB compressed) for games; one zzfx(..) call plays a sound, with a web designer to make new ones and save them as WAV. Price: free; commercial use OK; no credit needed.
  Connect: npm zzfx.
  Get files: npm install zzfx, then import {zzfx} from 'zzfx' and call zzfx(..params); or copy ZzFX.js from the repository.
  Not allowed: Keep the MIT notice with the code
  Rule: Keep the MIT copyright and permission notice with the ZzFX code you ship.
  License: https://github.com/KilledByAPixel/ZzFX/blob/master/LICENSE (checked 2026-11-07; details: https://agentgid.com/assets/zzfx/)
```

## Links
- AgentGid page: https://agentgid.com/assets/zzfx/
- Is it free for commercial use? https://agentgid.com/assets/zzfx/commercial-use/
- Source: https://github.com/KilledByAPixel/ZzFX
- Source: https://github.com/KilledByAPixel/ZzFX/blob/master/LICENSE
- Source: https://registry.npmjs.org/zzfx/latest


## ZzFX: game sound effects from one line of code

ZzFX is a very small free code library that makes sound effects, such as a coin, a jump or a hit, while the page runs. Each sound is a short list of numbers instead of an audio file, so your game or site needs no sound files to download. A free web designer lets you shape new sounds and save them as WAV files.

### Where to use it
- Sounds for a browser game: Give jumps, coins, hits and game-over moments their own sound in a small web game, without hunting for audio files.
- Game jams with a size limit: Keep sound in a game for a contest that caps the whole game at a few kilobytes, such as js13k.
- Placeholder sounds while prototyping: Try sound in an early game or app version in minutes, then swap in recorded sounds later if you want.
- Clicks and chimes on a website: Add a soft click to a button or a chime when a task is done on an ordinary website, not only in games.
- Sound files for other engines: Shape a sound in the free designer, download it as a WAV file and use it in an engine or app that cannot run JavaScript.
- Sound that changes with the action: Raise the pitch of a coin sound as the combo grows, or pan an explosion to the side where it happens. (idea, not from the official pages)

### How to start
- Install the package, or download ZzFX.js from the project page and keep it next to your code.

```
npm install zzfx
```

- Import it and play a sound with one call; the list of numbers describes the sound.

```
import {ZZFX, zzfx} from './ZzFX.js'
zzfx(...[,,,,.1,,,,9])
```

- Make new sounds in the free ZzFX Sound Designer and paste the code it gives you.

### License
MIT license: free in personal and paid games, apps and sites, no visible credit needed. Keep the short copyright and license notice with copies of the code.

### Good to know
- Sounds are made while the page runs, so there are no sound files to host or download.
- Each sound gets a small random change in pitch when played. Set the second number to 0 if you want it exactly the same every time.
- The library opens the browser's audio system as soon as it is loaded, so it runs only in a browser, not on a server.
- For music rather than single effects, the README points to a separate small player called ZzFXM.

Checked 2026-11-12 against: https://github.com/KilledByAPixel/ZzFX, https://github.com/KilledByAPixel/ZzFX/blob/master/README.md, https://github.com/KilledByAPixel/ZzFX/blob/master/LICENSE, https://github.com/KilledByAPixel/ZzFX/blob/master/ZzFX.js, https://registry.npmjs.org/zzfx, https://killedbyapixel.github.io/ZzFX/

### Mistakes to avoid
- Don't: Importing zzfx at the top of a server-rendered file (Next.js page, Nuxt server code, Node script) → Do: Import it only in browser code, for example inside useEffect, onMounted or a dynamic import (ZzFX.js creates an AudioContext when the module loads, and there is no AudioContext on the server.)
- Don't: zzfx([,,925,.04,.3]) with the array passed as one argument → Do: zzfx(...[,,925,.04,.3]) with the spread operator, so each number is its own argument (zzfx takes the numbers as separate parameters; the README always spreads the list.)
- Don't: Calling zzfx(...) again on every frame for a sound used very often → Do: Build it once with new ZZFXSound([...]) and call .play() when needed (The sound object stores the generated samples, so later plays start at once.)
- Don't: Writing sound parameters by guesswork → Do: Shape the sound in the ZzFX Sound Designer and paste the code it shows (The 20 numbers interact; the designer plays and draws each change.)

### Questions
- Do I need sound files? No. Each sound is a list of numbers that ZzFX turns into sound while the page runs.
- How do I make a new sound? Open the free ZzFX Sound Designer, shape or pick a random sound, and copy its zzfx code into your game.
- Can I use it in a paid game? Yes. It is MIT licensed; keep the copyright and license notice with the code.
- Can I get a WAV file for another engine? Yes. The designer can save each sound as a .wav file.
- Does it need other libraries? No. It runs on its own with no other libraries.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
