AudioBits is currently tested in Chromium-based browsers. Other browsers are not yet verified.
Glass notification
Four delicate partials with independent decays and a bright glass rim.
Control position · Brightness 50%
Glass notification: ready
Audio: idle
Sound controls
Add to project
npx shadcn@latest add joacod/audiobits/glass-notificationAdds editable source and the audiobits runtime dependency. Installation guide
Installs the catalog defaults. The usage below reflects your current settings and applied edits.
Use this sound
Use in src/integration.ts. Call play() from a user gesture and handle activation errors. Connect updates to application state; stop on cancellation or hiding, and dispose on removal.
import { createAudio } from "audiobits";
import { glassNotification } from "./sounds/recipes/glass-notification/recipe";
const audio = createAudio();
const sound = audio.sound(glassNotification);
let request = 0;
// Use in src/integration.ts. Call play() from a user gesture; handle errors.
export async function play() {
const token = ++request;
await audio.start();
if (token !== request) return;
sound.play({ parameters: {"brightness":0.5}, seed: 42 });
}
export function stop() {
request++;
audio.stopAll({ tails: "cut" });
}
// Call on navigation/unmount.
export async function dispose() {
stop();
sound.dispose();
await audio.dispose();
}
Production lifecycleCustomize or inspect
Recipe
Apply valid JSON edits to hear and copy them. Copy Recipe returns the applied definition; the Add command installs catalog defaults.
{
"duration": 0.42,
"effects": [
{
"filter": "lowpass",
"frequency": {
"control": "brightness",
"range": [
1800,
4800
],
"scale": "exponential"
},
"q": 0.7,
"type": "filter"
}
],
"kind": "one-shot",
"layers": [
{
"envelope": {
"attack": 0.003,
"decay": 0.32,
"release": 0.12,
"sustain": 0.02
},
"gainDb": -18,
"id": "fundamental",
"source": {
"frequency": {
"random": [
875,
885
]
},
"type": "oscillator",
"waveform": "sine"
}
},
{
"envelope": {
"attack": 0.004,
"decay": 0.21,
"release": 0.09,
"sustain": 0.015
},
"gainDb": {
"control": "brightness",
"range": [
-32,
-24
],
"scale": "linear"
},
"id": "partial",
"source": {
"frequency": {
"random": [
1418,
1430
]
},
"type": "oscillator",
"waveform": "sine"
}
},
{
"envelope": {
"attack": 0.002,
"decay": 0.12,
"release": 0.055,
"sustain": 0
},
"gainDb": {
"control": "brightness",
"range": [
-40,
-28
],
"scale": "linear"
},
"id": "glint",
"source": {
"frequency": {
"random": [
2016,
2032
]
},
"type": "oscillator",
"waveform": "sine"
}
},
{
"envelope": {
"attack": 0.003,
"decay": 0.06,
"release": 0.035,
"sustain": 0
},
"gainDb": {
"control": "brightness",
"range": [
-48,
-38
],
"scale": "linear"
},
"id": "rim",
"source": {
"frequency": 3180,
"type": "oscillator",
"waveform": "sine"
}
}
],
"parameters": {
"brightness": {
"default": 0.5,
"max": 1,
"min": 0,
"mode": "play"
}
},
"schemaVersion": 1
}