{"_id":"8bit-sfx","_rev":"2-04857b2529733d798446b62a210486a8","name":"8bit-sfx","dist-tags":{"latest":"1.0.0"},"versions":{"0.4.1":{"name":"8bit-sfx","version":"0.4.1","keywords":["8bit","chiptune","sfx","sound-effects","game-audio","wav","webaudio","procedural","retro"],"author":{"name":"Chris Portka","email":"chrisportka@gmail.com"},"license":"MIT","_id":"8bit-sfx@0.4.1","maintainers":[{"name":"chrisportka","email":"chrisportka@gmail.com"}],"homepage":"https://github.com/cportka/8bit-sfx#readme","bugs":{"url":"https://github.com/cportka/8bit-sfx/issues"},"dist":{"shasum":"cff519cf4ae54e16c0089003a85d1fb521dbf427","tarball":"https://registry.npmjs.org/8bit-sfx/-/8bit-sfx-0.4.1.tgz","fileCount":2207,"integrity":"sha512-oECrZBpevX7hu/3+fomhzoNquoS1PIk5GxE0L24jMb+iBmV6MmXvW0Twl5v2bpUw7gqKcRrIUm7fPO0r/7xKiw==","signatures":[{"sig":"MEQCIG1IIa3B6h1iwyYLu4qsoBQDx6uS9xc2uGYIF9G+/PHpAiBHV4lEY99JI1C0J5Gj54eHq/bABKNfdTJkIskjCtIr1A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32132817},"main":"src/index.js","type":"module","exports":{".":"./src/index.js","./sfx/*":"./sfx/*","./manifest":"./sfx/manifest.json","./package.json":"./package.json"},"funding":[{"url":"https://github.com/sponsors/cportka","type":"github"},{"url":"https://buymeacoffee.com/chrisportka","type":"buy_me_a_coffee"},{"url":"https://venmo.com/portka","type":"individual"}],"gitHead":"99a1396b6aadf23c835acbf46a79145098225378","scripts":{"test":"bash tests/run-tests.sh","generate":"python3 scripts/generate_sfx.py"},"_npmUser":{"name":"chrisportka","email":"chrisportka@gmail.com"},"repository":{"url":"git+https://github.com/cportka/8bit-sfx.git","type":"git"},"_npmVersion":"10.8.2","description":"2200 free, deterministic, procedurally generated 8-bit sound effects (WAV) with per-effect catalog descriptions and a tiny dependency-free JS API for browsers and Node.","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/8bit-sfx_0.4.1_1785628141086_0.8510023881548863","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"8bit-sfx","version":"1.0.0","description":"8888 chip sound effects across 44 categories, synthesized on demand in the browser or Node - no audio files, no dependencies. Game SFX and musical sound design, each with a catalog description; optional WAV export.","type":"module","main":"src/index.js","exports":{".":"./src/index.js","./manifest":"./sfx/manifest.json","./sfx/*":"./sfx/*","./package.json":"./package.json"},"scripts":{"test":"bash tests/run-tests.sh","generate":"node scripts/generate.mjs","catalog":"node scripts/generate.mjs --catalog-only"},"repository":{"type":"git","url":"git+https://github.com/cportka/8bit-sfx.git"},"keywords":["8bit","chiptune","sfx","sound-effects","game-audio","procedural","synthesis","webaudio","music","drum-samples","retro","wav"],"author":{"name":"Chris Portka","email":"chrisportka@gmail.com"},"license":"MIT","funding":[{"type":"github","url":"https://github.com/sponsors/cportka"},{"type":"buy_me_a_coffee","url":"https://buymeacoffee.com/chrisportka"},{"type":"individual","url":"https://venmo.com/portka"}],"_id":"8bit-sfx@1.0.0","gitHead":"8b748ccbd28ec0071d9cf73a16548cedead5a37e","bugs":{"url":"https://github.com/cportka/8bit-sfx/issues"},"homepage":"https://github.com/cportka/8bit-sfx#readme","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-8uJJI+O24N4hGvqWVbjs21uORiJnpyqznzVEVr8VHZ9NrfAT5JqJ8ekrG/RwNTsrwAjDRSz6oIdOlpDxpYiCTw==","shasum":"a359038ce57042b99ebf56489db776ff6bc805be","tarball":"https://registry.npmjs.org/8bit-sfx/-/8bit-sfx-1.0.0.tgz","fileCount":54,"unpackedSize":2970870,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDziB9vCP7kwGyWvKP8DErrIzIh2Tt9ckOKI3BaNWuMPgIhAOvFRL/4Rs/7etVyOxlj0NIlMhmNBr0Mj0oWyE4dOkDL"}]},"_npmUser":{"name":"chrisportka","email":"chrisportka@gmail.com"},"directories":{},"maintainers":[{"name":"chrisportka","email":"chrisportka@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/8bit-sfx_1.0.0_1785683510227_0.5094559123007711"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-01T23:49:01.055Z","modified":"2026-08-02T15:11:50.548Z","0.4.1":"2026-08-01T23:49:01.294Z","1.0.0":"2026-08-02T15:11:50.398Z"},"bugs":{"url":"https://github.com/cportka/8bit-sfx/issues"},"author":{"name":"Chris Portka","email":"chrisportka@gmail.com"},"license":"MIT","homepage":"https://github.com/cportka/8bit-sfx#readme","keywords":["8bit","chiptune","sfx","sound-effects","game-audio","procedural","synthesis","webaudio","music","drum-samples","retro","wav"],"repository":{"type":"git","url":"git+https://github.com/cportka/8bit-sfx.git"},"description":"8888 chip sound effects across 44 categories, synthesized on demand in the browser or Node - no audio files, no dependencies. Game SFX and musical sound design, each with a catalog description; optional WAV export.","maintainers":[{"name":"chrisportka","email":"chrisportka@gmail.com"}],"readme":"# 8bit-sfx\n\n**Version:** 1.0.0\n\n**8888 chip sound effects across 44 categories — synthesized on demand, not downloaded.**\nThere are no audio files in this package. Every effect is a deterministic function of its\nname, so `render('kick_003')` produces the same samples in a browser, in Node, today and\nin five years. Game SFX *and* musical sound design, every effect carrying a catalog\ndescription so you can find what you need by reading instead of auditioning.\nMIT licensed — use them in anything.\n\n**Try them: <https://cportka.github.io/8bit-sfx/>** — the whole library, synthesized live\nin your browser as you click.\n\n## Install & use\n\n```sh\nnpm install 8bit-sfx\n```\n\n```js\nimport { SfxPlayer, render, renderWav, describe, effectNames } from '8bit-sfx';\n\n// Play — no preloading, no fetching, nothing to bundle\nconst sfx = new SfxPlayer();\nbutton.addEventListener('click', () => {\n  sfx.resume();              // browsers gate audio on a user gesture\n  sfx.play('kick_003');      // synthesized on first use, then cached\n  sfx.play('bass_120', { volume: 0.8, rate: 1.0 });\n});\n\ndescribe('bass_120');        // \"wobble bass — ramp LFO on amp gate, 8.6 Hz at A1\"\nrender('snare_012');         // Float32Array, 22050 Hz mono — feed it anywhere\nrenderWav('rpg_levelup');    // Uint8Array: a complete .wav file, if you want a file\neffectNames();               // all 8888 names, no synthesis\n```\n\nDependency-free and build-free — pure ES modules, no bundler required, no assets to copy.\nThe package is a **377 kB download** (3.0 MB unpacked): ~940 KB of engine plus the 2 MB\ncatalog. No audio ships — 8888 sounds cost kilobytes of code instead of ~130 MB of WAVs.\n\n### API\n\n| | |\n|---|---|\n| `render(name)` | `Float32Array` of samples in [-1, 1) at 22050 Hz |\n| `renderPcm(name)` | `Uint8Array` of 8-bit unsigned PCM |\n| `renderWav(name)` | `Uint8Array` containing a complete `.wav` file |\n| `describe(name)` | the catalog blurb — what makes this effect different |\n| `duration(name)` / `describeFull(name)` | length in seconds / full metadata entry |\n| `effectNames()` / `CATEGORIES` / `COUNT` | the catalog's shape, without synthesizing |\n| `categoryCharacter(cat)` | the one-line description of a category |\n| `loadManifest()` | the prebuilt catalog: every effect's description and duration |\n| `new SfxPlayer()` | Web Audio playback: `resume()`, `play(name, {volume, rate})`, `muted` |\n\n## Categories\n\nEach category holds **202** effects, named `<category>_000` … `<category>_201`. (The one\nexception is `rpg`: `rpg_000`–`rpg_173` plus the 28 ported sounds under their event names.)\n\n### Game sounds\n\n<!-- GAME-TABLE -->\n| Category | Character |\n|---|---|\n| `jump` | rising square hops, snappy or floaty tails |\n| `coin` | bright two-note pickup blips, classic coin grab |\n| `laser` | fast downward zaps, clean or warbled pew |\n| `explosion` | noise booms, dry cracks to sub-heavy rolling blasts |\n| `powerup` | rising scale fanfares, bright pickup arpeggios |\n| `hit` | blunt impacts, noise burst over a diving low thud |\n| `blip` | tiny UI ticks and menu selects, crisp square clicks |\n| `alarm` | alternating two-tone sirens, frantic to steady |\n| `drone` | sustained bass hums, gentle to seasick wobble |\n| `jingle` | short melodic stingers, 3-6 notes resolving upward |\n| `ambient` | wind gusts, cricket chorus, cave drips, thunder, rain, shimmer pads |\n| `ui` | menu clicks, hovers, toggles, dings, error buzzes, key ticks |\n| `voice` | chip-speech babble, grunts, hums, laughs, gasps, sighs, hey! calls |\n| `dog` | chip barks big and small, yips, whines, whimpers, growls, pants, howls |\n| `zombie` | undead groans, moans, hisses, gurgles, rattling breath, snarls |\n| `monster` | creature roars, screeches, snarls, chitter, stomps, flaps, squelches |\n| `water` | drips, splashes, pours, streams, underwater blubs |\n| `fire` | crackling campfires, ignition whooshes, torch flutter, sizzles, ember pops |\n| `footstep` | steps on grass, gravel, stone, wood, snow, mud, puddles |\n| `mech` | creaks, slams, latches, levers, switches, rattles, ratchets, key jangles |\n| `person` | heartbeats, breaths, sneezes, snores, claps, gut growls |\n| `rpg` | sword swings, spells, loot jingles, level-ups, warps, save chimes (174 generated + 28 ported) |\n\n### Musical sound design\n\n<!-- MUSIC-TABLE -->\n| Category | Character |\n|---|---|\n| `kick` | tight chip kicks, 808 drops, gated and crushed thumps |\n| `snare` | noise-and-tone backbeats, cracks, gated slams, rimshots, flams |\n| `hihat` | crisp closed ticks, open sizzles, pedal chicks, metallic sheen |\n| `tom` | tuned rack and floor toms, falling bends, roto rises, fills |\n| `cymbal` | long crashes, pinging rides, ride bells, splashes, chinas, chokes |\n| `perc` | tuned cowbells, blocks, claves, shakers, congas, agogo bells |\n| `bass` | plucked and sustained chip bass, acid sweeps, wobbles, slaps |\n| `sub` | 808 slides, deep drops, gated and growling sub-bass |\n| `lead` | square and PWM chip leads, glides, licks, echoes, stabs |\n| `pluck` | harp and marimba plucks, glassy mallets, muted stabs, octave doubles |\n| `arp` | chord-tone arpeggio runs, octave jumps, glissandi, ratchets |\n| `chord` | tuned chord stabs, power chords, wide voicings, gated chops |\n| `bell` | struck bronze bells, tubular chimes, music-box tines, shimmer tails |\n| `organ` | drawbar stacks, church pipes, rock bite, leslie swirl, percussive taps |\n| `string` | bowed swells, tremolo and spiccato bowing, pizzicato, detuned ensembles |\n| `brass` | chip brass stabs, fanfares, swells, muted buzz, section falls |\n| `reed` | breathy chip flutes, hollow clarinet, nasal oboe, ocarina, pan pipes |\n| `pad` | warm detuned beds, glassy stacks, dark slabs, filter sweeps, gated pulses |\n| `riser` | noise sweeps, pitch glides, gated builds, drum rolls, filter falls |\n| `impact` | cinematic booms, metallic slams, sub drops, braams, debris tails |\n| `glitch` | buffer stutters, bitcrush bursts, tape stops, garbled data chirps |\n| `vinyl` | crackle beds, needle drops, tape hiss, wow/flutter, static, motor hum |\n\n\nThe `rpg` category also contains the complete sound set of\n[pixel-rpg](https://github.com/cportka/pixel-rpg) — 28 sounds ported exactly from that\ngame's Web Audio engine, keeping their event names (`rpg_levelup`, `rpg_menu-open`, …) and\nthe game's intended relative loudness in the catalog's `gain` field.\n\n## Exporting WAV files (optional)\n\nThe library never needs files, but you can have them:\n\n```sh\nnpm run generate                       # every effect -> sfx/<category>/<name>.wav\nnpm run catalog                        # just rebuild sfx/manifest.json\nnode scripts/generate.mjs --only kick_003 rpg_levelup\n```\n\n`sfx/*.wav` is git-ignored — it's an export, not a source. The testing page also has a ⬇\nbutton on every row that exports that one effect. Only `sfx/manifest.json` (the catalog)\nis committed and shipped.\n\n## How it works\n\n`src/dsp.js` holds the chip-synth primitives: a seeded xorshift PRNG, NES-style 15-bit LFSR\nnoise, square/triangle/sawtooth oscillators, and a 16-level amplitude quantizer that gives\nthe library its 4-bit-DAC voice. Each category in `src/generators/` is a small module that\ndraws its parameters from the PRNG, renders samples, and records what it chose — which is\nwhere the descriptions come from, so they always describe the actual synthesis rather than\nan intention. Because the PRNG is seeded from the effect's name, the whole library is\nreproducible from under a megabyte of code.\n\n## Stability\n\n1.0.0 is a stable API commitment: the exported functions, the manifest entry shape, and\neffect naming are covered by SemVer. Effects only ever get appended — existing names keep\ntheir sound.\n\n## License\n\n[MIT](LICENSE) — free for commercial and non-commercial use, attribution appreciated but\nnot required.\n","readmeFilename":"README.md"}