make-distortion-curve

1.0.0 • Public • Published

make-distortion-curve

NPM

cuz im tired of copy pasting the only distortion curve i have ever known.

install

npm install make-distortion-curve

use it

var audioCtx = new (window.AudioContext || window.webkitAudioContext)()
var distortion = audioCtx.createWaveShaper()

var makeDistortionCurve = require('make-distortion-curve')
distortion.curve = makeDistortionCurve(400)

code hoisted from http://stackoverflow.com/questions/22312841/waveshaper-node-in-webaudio-how-to-emulate-distortion and https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createWaveShaper

Package Sidebar

Install

npm i make-distortion-curve

Weekly Downloads

7

Version

1.0.0

License

MIT

Last publish

Collaborators

  • coleww