1.1.0 • Published 4 years ago

@teropa/drumkit v1.1.0

Weekly downloads
12
License
MIT
Repository
github
Last release
4 years ago

A collection of simple drum hits, usable as a sampled drum kit in a Web Audio application.

Usage

import {
  kick,
  snare,
  hatClosed,
  hatOpen,
  tomLow,
  tomMid,
  tomHigh,
  ride,
  crash,
} from "@teropa/drumkit";

// Each import will be a URL from which the sample data may be loaded and decoded with a Web Audio AudioContext

fetch(kick)
  .then((res) => res.arrayBuffer())
  .then((buf) => audioContext.decodeAudioData(buf));

License

Code is MIT licensed.

Samples are from freesound.org: