Type
Tool note
Status
Active public repo note
Published
2026-04-30
Version
v0.1.0
Canonical URL
https://shanecurry.com/lab/tools/chewgum-dsp/
Repository
github.com/chewgumlabs/ChewGumDSP/tree/v0.1.0
Related project
ChewGum Animation

chewgum-dsp v0.1.0 is a narrow public extraction of shipped Web Audio helpers: an NES-style triangle PeriodicWave generator, MIDI-to-frequency conversion, and a small bell trigger.

createNesTriangleWave(audioContext)
Builds a Web Audio PeriodicWave from a 32-step NES-style triangle source table, projected onto 24 cosine/sine harmonics with the DC offset removed.
midiToFrequency(midi)
Converts a MIDI note number to frequency in hertz using A4 = 440 Hz.
strikeBell(audioContext, destination, periodicWave, options)
Triggers a three-voice bell: triangle fundamental plus two sine harmonics through a bandpass filter. Options are midi, intensity, and pan.
  • No OPL2 emulation.
  • No AudioWorklet wrapper.
  • No stroke interpretation layer.
  • No private ChewGum DSP research code.

The library exists because the NES-style triangle source has a different audible character from the browser's native triangle oscillator, and that difference already appears in shipped public work. The first release keeps only the slice needed to name and reuse that sound honestly.

This is a dependency-free ESM library. The public repository contains the source, MIT license, README, and v0.1.0 tag.

import { createNesTriangleWave, midiToFrequency, strikeBell } from '@chewgum/dsp';

The README includes a browser example. The npm package name is reserved in the source metadata, but this page only claims the GitHub repository and tag.

Shane Curry / ChewGum Labs, "chewgum-dsp v0.1.0," https://shanecurry.com/lab/tools/chewgum-dsp/, published 2026-04-30.