New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

snare

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snare

`npm install --save snare`

latest
npmnpm
Version
2.8.1
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 28 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts