Connect with me via the floating button
Library
Procedural 8-bit game audio in ~150 lines.
Bleeps is a zero-dependency npm package that generates retro game sounds using the Web Audio API. No audio files needed. Each effect is synthesized in real time with oscillators, noise, and filters so you can ship tiny, expressive sound packs.
Listed in Projects.
Arcade Audio Console
Procedural Web Audio in real time
Procedural audio trades megabytes of WAV files for a few lines of code. Instead of shipping assets, you build sound from the same primitives that power early arcade machines: oscillators, noise, filters, and envelopes. The result is tiny, dynamic, and expressive.
Shipping audio files is expensive for small web games and prototypes. Each effect adds download weight, and looping or layering variants quickly multiply the payload. Procedural audio keeps the bundle light and makes it easy to generate new variations on the fly.
Every sound in Bleeps starts with an oscillator, then a gain node shapes the envelope. A quick exponential ramp gives you that snappy arcade snap.
const ctx = new AudioContext()
const osc = ctx.createOscillator()
const gain = ctx.createGain()
osc.type = 'square'
osc.frequency.value = 440
gain.gain.setValueAtTime(0.2, ctx.currentTime)
gain.gain.exponentialRampToValueAtTime(0.001, ctx.currentTime + 0.12)
osc.connect(gain)
gain.connect(ctx.destination)
osc.start()
osc.stop(ctx.currentTime + 0.12)Noise buffers and filters fill in the booms and impact textures. Explosions are just filtered noise plus a low sine thump.
const bufferSize = ctx.sampleRate * 0.2
const buffer = ctx.createBuffer(1, bufferSize, ctx.sampleRate)
const data = buffer.getChannelData(0)
for (let i = 0; i < bufferSize; i += 1) {
data[i] = Math.random() * 2 - 1
}
const noise = ctx.createBufferSource()
noise.buffer = buffer
const filter = ctx.createBiquadFilter()
filter.type = 'lowpass'
filter.frequency.value = 1000
noise.connect(filter)
filter.connect(gain)Arcade Presets
Each preset is a tiny composition of waveforms and envelopes. These calls map to the built-in ArcadeSounds presets.
Square wave with a fast pitch drop for laser blasts.
arcade.shoot()Noise burst with a lowpass filter and a sub tone.
arcade.explosion()Sawtooth sweep from high to low for damage feedback.
arcade.hit()Ascending arpeggio (C-E-G-C) for progression cues.
arcade.levelUp()Four-step march loop for retro movement ticks.
arcade.step()Triangle wave with vibrato for hovering motion.
arcade.ufo()Rising shimmer for power collect moments.
arcade.powerUp()Double high ding for pickups and rewards.
arcade.coin()Descending tones to close a session.
arcade.gameOver()Bleeps ships as a tiny, zero-dependency package with ESM, CJS, and UMD builds. Install it with your package manager of choice.
npm install bleeps
# or
pnpm add bleepsThe arcade presets are instant, and the core Bleeps class exposes a simple beep API for your own synth ideas.
import { Bleeps, arcade } from 'bleeps'
arcade.shoot()
arcade.explosion()
arcade.coin()
const bleeps = new Bleeps({ volume: 0.5 })
bleeps.beep(440, 100, 'square')Explore the source, presets, and roadmap on github.com/amirbrooks/bleeps.