@mohayonao/envelope

simple envelope

Stats

StarsIssuesVersionUpdatedCreatedSize
@mohayonao/envelope
500.1.46 years ago6 years agoMinified + gzip package size for @mohayonao/envelope in KB

Readme

ENVELOPE

Build Status NPM Version License

simple envelope

Installation

Node.js

npm install @mohayonao/envelope

Browser

API

Envelope

  • constructor(params: [ time: number, value: number, curve: number ][])

Class methods

  • adssr(attackTime, decayTime, sustainLevel, sustainTime, releaseTime, [ totalLevel = 1 ]): Envelope
  • ads(attackTime, decayTime, sustainLevel, [ totalLevel = 1 ]): Envelope
  • asr(attackTime, sustainTime, releaseTime, [ totalLevel = 1 ]): Envelope
  • a(attackTime, [ totalLevel = 1 ]): Envelope
  • dssr(decayTime, sustainLevel, sustainTime, releaseTime, [ totalLevel = 1 ]): Envelope
  • ds(decayTime, sustainLevel, [ totalLevel = 1 ]): Envelope
  • r(releaseTime, [ totalLevel = 1 ]): Envelope
  • cutoff(releaseTime, [ totalLevel = 1 ]): Envelope

Instance attribute

  • params: [ number, number, number ][]
  • duration: number

Instance methods

  • valueAt(time: number): number
  • applyTo(audioParam: AudioParam, playbackTime: number): self
  • map(fn: function): Envelope
  • madd(mul: number, add: number = 1): Envelope

License

MIT

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.