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/envelope-set-initial-value.md
1---2title: Set Initial Value Before Ramp3impact: MEDIUM4tags: envelope, initial, glitch5---67## Set Initial Value Before Ramp89Set initial value before ramping to avoid glitches.1011**Incorrect (no initial value):**1213```ts14gain.gain.exponentialRampToValueAtTime(0.001, t + 0.05);15```1617**Correct (initial value set):**1819```ts20gain.gain.setValueAtTime(0.3, t);21gain.gain.exponentialRampToValueAtTime(0.001, t + 0.05);22```23