2.8.1 • Published 10 years ago
snare v2.8.1
##Usage
npm install --save snare
var Snare = require('snare');
// Initialize AudioContext
var context = new AudioContext();
// Initialize instrument
var snare = Snare(context);
// Create snare audio node (one time use only)
var snareNode = snare();
// Connect to target node
snareNode.connect(context.destination);
/*
* detune is connected to the oscillators' detune
*/
snareNode.detune instanceof AudioParam
// -> true
snareNode.detune.value = 1200;
/*
* snappy controls the gain of the noise
*/
snareNode.snappy instanceof AudioParam
// -> true
snareNode.snappy.value = 0.75
/*
* tone controls the mix between low and high tones
*/
snareNode.tone instanceof AudioParam
// -> true
snareNode.tone.value = 0.5
/*
* duration defaults to 0.3
*/
snareNode.duration = 0.2
// Start
snareNode.start(context.currentTime);2.8.1
10 years ago
2.8.0
10 years ago
2.7.1
10 years ago
2.7.0
10 years ago
2.6.0
10 years ago
2.5.1
10 years ago
2.5.0
10 years ago
2.1.1
10 years ago
2.3.0
10 years ago
2.2.0
10 years ago
2.1.0
10 years ago
2.0.0
10 years ago
1.1.1
10 years ago
1.1.0
10 years ago
1.0.3
10 years ago
1.0.2
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago