A lightweight TypeScript library for procedural rain and thunder sound generation using the Web Audio API.
Perfect for ambience apps, games, or chill projects.
- π§οΈ Realistic rain synthesis with adjustable drop rate, pitch, decay, and EQ
- β‘ Procedural thunder bursts with reverb, stereo spread, and randomness
- ποΈ Full parameter control with support for oscillation and randomization
- π¦ Easily importable into any modern JS/TS project
- πͺΆ Lightweight, no dependencies
npm install noisedimport { RainGenerator, ThunderGenerator } from 'noised';
// Create audio context
const audioCtx = new AudioContext();
// Setup rain
const rain = new RainGenerator(audioCtx, yourRainParams);
rain.start();
// Setup thunder
const thunder = new ThunderGenerator(audioCtx, yourThunderParams);
thunder.trigger(); // on demandnpm run buildFor dev mode with watch:
npm run devThe name is David Portal, hi π I'll soon add a website with more of my projects.