sfumato
v0.3.0
Published
This library is able to play soundfonts (sf2 files) with the Web Audio API.
Maintainers
Readme
sfumato
The blurring or softening of sharp outlines in painting by subtle and gradual blending of one tone into another.
This library is able to play soundfonts (sf2 files) with the Web Audio API.
Status
It's still a work in progress! There might be a roadmap at some point in the future
Installation
npm i sfumato --saveImport
import { loadSoundfont, startPresetNote } from 'sfumato';API
loadSoundfount(url)loads a soundfont from a url. returns Soundfont2startPresetNote(ctx, preset, midi, time)plays a note, returnsstopHandlectxthe audio context to usepresetthe preset to use (use one of Soundfont2.presets)midimidi number to playtimeaudio context time to start playing (defaults to currentTime)
stopHandle(time)stops the note at the given time
Links
- DEMO (coming soon)
- Codeberg
- Blog Post (draft)
- Usage with Strudel
- Minimal vanilla JS app example
