CreateJS / SoundJS

A Javascript library for working with Audio. It provides a consistent API for loading and playing audio on different browsers and devices. Currently supports WebAudio, HTML5 Audio, Cordova / PhoneGap, and a Flash fallback.
http://createjs.com/
MIT License
4.42k stars 838 forks source link

Proposed new features: filtering, distortion and convolution (reverb) #238

Open tyler-g opened 8 years ago

tyler-g commented 8 years ago

Wanted to share an idea I had for the soundJs library to be able to support additional features such as: _filtering, convolution (reverb) and distortion. _

I've been working on an experimental sound project which needed these extra features, so I forked off the great soundjs library.

Looking for feedback and/or if there is a better way to implement this. I took the approach of adding to the audio node chain, which is by default in the original soundJs library as follows: pan => gain => destination, and is now: distortion => filter => convolver => pan => gain => destination

I tried to follow the conventions for private / public methods, object setting/getting for these new features.

The convolverBuffer property can be set directly (as an AudioBuffer), or can be passed a string which is the filepath to an impulse response (essentially a .wav file recording of a loud impulse which tails off in the space). If passed a filepath, the code will recognize that and attempt to read the file into an AudioBuffer automatically.

Aekkapong18 commented 6 years ago

Ok

ghost commented 6 years ago

Images_To_PDF_20180312211000102.pdf