UI Sounds
A catalogue of interface sounds synthesised with the Web Audio API, with play keys, envelope glyphs, volume, mute and a provider hook for apps.
Preview
Sounds on
60%
In context
Install
Pro source requires Pebble Pro. Try the full preview above.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| sounds | SoundRecipe[] | uiSounds | SoundBoard: recipes to list. |
| SoundRecipe | { id, label, usage, notes: { wave, from, to?, start, duration, gain }[] } | — | A sound as oscillator notes; times in seconds, pitch in Hz. |
| UiSoundProvider | { defaultVolume?, defaultMuted? } | 0.6 / false | One volume and mute for the app; SoundBoard uses it when present. |
| useUiSound() | (id: string) => number | — | Plays a sound by id at the provider volume; returns its length in ms. |
| playSound | (recipe, volume?) => number | — | Synthesises any recipe with the Web Audio API (call from a user gesture). |
Pro component
Try the full preview above. Editable source and build guides require Pebble Pro.
