Sound Effects

Experimental audio feedback using Web Audio API. Click, hover, success, and error sounds with user preference controls.

Token Reference: See Themes > Extensions for token documentation. Source: src/lib/sound-manager.js

Interaction Sounds

Click the buttons to hear different sound effects.

// Web Audio API tone generator function playTone(frequency, duration, type = 'sine') { const ctx = new AudioContext(); const oscillator = ctx.createOscillator(); const gainNode = ctx.createGain(); oscillator.connect(gainNode); gainNode.connect(ctx.destination); oscillator.frequency.value = frequency; oscillator.type = type; gainNode.gain.value = volume * 0.3; oscillator.start(); gainNode.gain.exponentialRampToValueAtTime(0.01, ctx.currentTime + duration); oscillator.stop(ctx.currentTime + duration); }

Hover Sounds

Hover over cards to trigger subtle audio feedback.

Soft

Subtle pop

Tick

Clock tick

Whoosh

Air sound

Considerations

Important factors for implementing sound in web interfaces.