Skip to content

Extended functionality for the Web Audio API including basic effects such as EQ, chorus, delay, and reverb.

License

Notifications You must be signed in to change notification settings

JohnnyStreet/web-audio-extended

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

web-audio-extended

Include the script in your HTML:

<script src="AudioContextExtended.js"></script>

Create an audio context:

const audioContext = new AudioContextExtended();

Create and connect components:

const audioContext = new AudioContextExtended();

const eq = audioContext.createThreeBandEqualizer();
const reverb = audioContext.createReverbEffect();

mySource.connect(eq).connect(reverb).connect(audioContext.destination);

Simplify effects chains:

const audioContext = new AudioContextExtended();

const eq = audioContext.createThreeBandEqualizer();
const chorus = audioContext.createChorusEffect();
const delay = audioContext.createDelayEffect();
const reverb = audioContext.createReverbEffect();
const vinyl = audioContext.createVinylEffect();

const effectsChain = audioContext.createEffectsChain([
  eq,
  chorus,
  delay,
  reverb,
  vinyl
]);

mySource.connect(effectsChain).connect(audioContext.destination);

...

effectsChain.toggleBypass(chorus); // toggle effects on demand

About

Extended functionality for the Web Audio API including basic effects such as EQ, chorus, delay, and reverb.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published