mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 21:58:31 +00:00
938 B
938 B
superdough
superdough is a simple web audio sampler and synth, intended for live coding. It is the default output of strudel. This package has no ties to strudel and can be used to quickly bake your own music system on the web.
Install
via npm:
npm i superdough --save
Use
import { superdough, samples } from 'superdough';
// load samples from github
const loadSamples = samples('github:tidalcycles/Dirt-Samples/master');
// play some sounds when a button is clicked
document.getElementById('play').addEventListener('click', () => {
superdough({ s: "bd", delay: .5 }, 0);
superdough({ s: "sawtooth", cutoff: 600, resonance: 8 }, 0);
superdough({ s: "hh" }, 0.25);
superdough({ s: "sd", room: .5 }, 0.5);
superdough({ s: "hh" }, 0.75);
})