hi-hat

3.0.0 • Public • Published

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);

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i hi-hat

    Weekly Downloads

    0

    Version

    3.0.0

    License

    ISC

    Last publish

    Collaborators

    • itsjoesullivan