sampler-instrument
v0.1.0
Published
A web audio sampler instrument
Downloads
2
Maintainers
Readme
sampler-instrument
A web audio sampler instrument:
var ac = new AudioContext()
var sampler = require('sampler-instrument')(ac)
var drums = sampler({
name: 'Drum machine',
samples: {
'kick': ... // <- an audio buffer object
'snare': ... // <- an audio buffer object
}
})
drums.connect(ac.destination)
var now = ac.currentTime
drums.play('kick', now)
drums.play('snare', now + 0.5)
Install
Via npm only: npm i --save sampler-instrument
User Guide
Not yet. Meanwhile read API.md
License
MIT License