sfxr (jsfxr) icon

sfxr (jsfxr)

Standard softwareFOSS · MIT

Original MIT chiptune sound effect generator for game jams

Free (MIT) · DrPetter & Chris McCormick · Standard software workflow; Steam AI disclosure does not apply.

AI
Standard
IP
Commercial-Safe IP
Engines
Web / JS, Godot, Unity
Platforms
Web · Windows · Linux · CLI
Version
1.3
Technical Summary

sfxr (maintained on the web and CLI as jsfxr) is the original free, MIT open-source 8-bit chiptune sound effect generator for Web, Windows, Linux, and Node.js CLI. Beyond instant browser .wav export, its <5 KB JavaScript library synthesizes retro SFX procedurally at runtime from compact seeds.

Technical Overview

Architecture and Production Workflow

Originally coded in C++ by Tomas Pettersson (DrPetter) for a 48-hour Ludum Dare jam and brought to modern browsers and Node.js pipelines as jsfxr (v1.3) by Chris McCormick, sfxr remains the fastest deterministic retro SFX generator in game development. Every sound is fully defined by 24 floating-point parameters governing four classic waveforms (Square, Sawtooth, Sine, White Noise), square-wave duty cycle and duty sweep, 4-stage envelope (Attack, Sustain, Sustain Punch, Decay), frequency slide/delta-slide, vibrato LFO, arpeggio pitch jump, phaser offset sweep, repeat re-triggering, and resonant low-pass/high-pass filters.

Studios and solo developers use sfxr / jsfxr in two ways:

  • Instant Static Asset Export: Click preset generators (Pickup/Coin, Laser/Shoot, Explosion, PowerUp, Hit/Hurt, Jump, Blip/Select), dial Mutate, and download 44.1 kHz or 22.05 kHz 8-bit/16-bit PCM .wav files for Godot, Unity, GameMaker, LÖVE, or Defold.
  • Procedural Runtime WebAudio: Embed jsfxr (<5 KB minified) directly inside HTML5, Phaser, PixiJS, or js13kGames entries to synthesize hundreds of varied sound effects dynamically via WebAudio from tiny Base58 URL slugs or JSON objects without shipping a single audio file.

Pricing, Licensing, and Commercial Rights

jsfxr is distributed under the MIT License (building on DrPetter's MIT/permissive sfxr release) at $0. Both exported .wav files and the embedded jsfxr JavaScript synthesizer carry zero royalties, zero attribution obligations on rendered audio, and full commercial clearance across Steam, mobile, console, and browser portals.

Strengths and Tradeoffs in Studio Pipelines

Pipeline Dimensionsfxr (jsfxr) AdvantageLimitation / When to Swap
Bundle Size<5 KB JS synth generates unlimited runtime SFX from tiny Base58/JSON parameter stringsRestricted to 4 basic waveforms without Triangle waves, Pink Noise, or multi-patch mixing (use Bfxr)
ReproducibilityEvery sound serializes to a shareable URL or JSON seed that can be version-controlled in GitFixed single-slope slides cannot draw arbitrary multi-point pitch or volume curves (use ChipTone)
CLI AutomationNode.js jsfxr CLI compiles JSON seed manifests into .wav folders during automated buildsStrictly retro 8-bit aesthetic; unsuitable for cinematic, orchestral, or realistic foley audio

AI Transparency & Steam Disclosure

Standard Software

Procedural math, physics, or manual authoring software.

Steamworks guidance: Standard software workflow; Steam AI disclosure does not apply.

Technical FAQ about sfxr (jsfxr)

How do HTML5 and js13kGames developers use jsfxr to save download size?
Instead of bundling dozens of 30 KB .wav files, web developers import the <5 KB jsfxr WebAudio script and store each sound effect as a short 30-character Base58 string or compact JSON array, synthesizing audio buffers in milliseconds at startup or on trigger.
Can I randomize pitch or parameters dynamically at runtime with jsfxr?
Yes. Because jsfxr exposes all 24 synthesis parameters as plain JavaScript numbers before generating the WebAudio buffer, gameplay code can jitter base frequency, filter cutoff, or decay time slightly on every footstep or laser shot to prevent ear fatigue.
When should I pick ChipTone or Bfxr over sfxr?
Stick with sfxr/jsfxr when you want zero-friction 8-bit presets, CLI seed compilation, or tiny runtime WebAudio synthesis. Switch to Bfxr for NES Triangle bass and 5-layer mixing, or switch to ChipTone when you want to draw custom pitch/volume envelopes and preview notes on a piano keyboard.

More tools like sfxr (jsfxr)