hi-hat
v3.0.0
Published
A web audio module for synthesizing hi-hats
Downloads
3
Readme
##Usage
npm install --save hi-hat
var HiHat = require('hi-hat');
// Initialize AudioContext
var context = new AudioContext();
// Initialize instrument
var hat = HiHat(context);
// Create hat audio node (one time use only)
var closedHatNode = hat(); // Closed hat
var openHatNode = hat(true); // Open hat
// Connect to target node
closedHatNode.connect(context.destination);
// Start
closedHatNode.start(context.currentTime);