Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Living wiki of UI design patterns and best practices built with Fumadocs, Next.js, and Base UI components.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
rules/design-noise-for-percussion.md
1---2title: Noise for Percussive Sounds3impact: MEDIUM4tags: design, noise, percussion5---67## Noise for Percussive Sounds89Use filtered noise for clicks/taps, not oscillators.1011**Incorrect (oscillator for click):**1213```ts14const osc = ctx.createOscillator();15osc.type = "sine";16```1718**Correct (noise burst for click):**1920```ts21const buffer = ctx.createBuffer(1, ctx.sampleRate * 0.008, ctx.sampleRate);22const data = buffer.getChannelData(0);23for (let i = 0; i < data.length; i++) {24data[i] = (Math.random() * 2 - 1) * Math.exp(-i / 50);25}26```27