AudioBits is currently tested in Chromium-based browsers. Other browsers are not yet verified.
Groove Mixer
Find the pocket in a looping drums-and-bass groove. Balance the parts, mute a layer, and feel them lock together.
The pulse
The movement
The whole groove
Bring the bass forward. Let the drums breathe. Adjust each level or mute a part to hear how they lock together. Tap the stage or press Enter to play and stop. Escape stops.
Groove stopped.
Add to project
npx shadcn@latest add joacod/audiobits/groove-mixerAdds editable source and the audiobits runtime dependency. Installation guide
Installs the catalog defaults and sound controller. The website visuals and input system stay in the showcase.
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 {
createGroove,
type MixChannel,
} from "./sounds/experiences/groove-mixer/controller";
const audio = createAudio({ maxVoices: 24, masterGainDb: -8 });
const groove = createGroove(audio, (cause) => console.error(cause));
groove.setMix("drums", {"level":0.5,"muted":false});
groove.setMix("bass", {"level":0.5,"muted":false});
groove.setMix("master", {"level":0.8,"muted":false});
let request = 0;
export async function play() {
const token = ++request;
await audio.start();
if (token !== request) return;
groove.start();
}
export function update(level: number) {
groove.setMix("bass", { level });
}
export function mix(channel: MixChannel, level: number, muted: boolean) {
groove.setMix(channel, { level, muted });
}
export function stop() {
request++;
groove.stop();
}
export async function dispose() {
stop();
groove.dispose();
await audio.dispose();
}
Production lifecycleCustomize or inspect
Connect your application's state and events to the sound controller. The full showcase source includes the browser host, input, and visuals.
View complete public source