Lab

drum-rack

Drum racks: an instrument whose chains are pads, each answering a note with the instrument at its head, such as a Drum Synth, or else a voice of the drum synthesis or a recording, into its own devices, a pad of a choke group cutting the others short; the engine that plays one on a MIDI track.

pnpm dlx shadcn@latest add @audio-ui/drum-rack
import { padsOf, createDrumRackEngine } from "@/lib/drum-rack";
Fileslib/drum-rack.ts
Depends onarrangement, drum-synthesis, instrument-rack, rack, voice-pool
npm@audio-ui/engine
Used byarrangement-engine
ExportKindWhat it is
PadRecordingtypeA recording a pad plays: an AudioBuffer, or its channels decoded.
padsOffunctionThe pads of a drum rack that a note plays: the chains that answer it.
DrumRackEngineinterfaceA drum rack playing on a context: a note player whose note on plays the pads of its pitch, as loud as its velocity, and rings for their decay; a note off lets nothing go, and release takes back the hits that start after its time, as a stop does, those sounding ringing out.
createDrumRackEnginefunctionPlays drum racks on ctx.

Usage

An instrument of pads: each chain answers a note with the instrument at its head (a Drum Synth, say), or a voice of the drum synthesis or a recording, into its own devices, summed as a rack with its macros. A pad of a choke group cuts the others short.

import { createDrumRackEngine, padsOf } from "@/lib/drum-rack";

const drums = createDrumRackEngine(ctx, libraryDevice);
drums.output.connect(destination);
drums.update(rack, { tempo });
const pads = padsOf(rack, 36); // the chains a note plays

Start a rack from drum-kit; its face is the Drum rack panel, and the arrangement engine plays it on a MIDI track.

Built by Ouest Labs, the source code is available on GitHub.
RSS