Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding a reverb effect to my audio file

I'm looking for a javascript code that causes a reverb to an audio file.the audio file is a recorded audio file using html5.I want to be able to add the reverb effect to that file.I tried searching Google for anycode. but could not find or sometimes find something hard to follow if someone can please help

like image 248
lama Avatar asked Jul 24 '14 06:07

lama


People also ask

How do I add reverb effect?

If necessary, add a few seconds of silence to the end of the track (see steps 1.1 to 1.4 in the example below). Select the audio track that contains the vocal recording. Click Effect > Reverb to launch the Reverb effect. In the "Presets" panel, click the Load button, select Vocal II from the list then click OK.


1 Answers

There are several libraries on github enabling this:

https://github.com/web-audio-components/simple-reverb

https://github.com/Dinahmoe/tuna

What they eventually do, is using the AudioContext api to create a convolver(which is also an option if you dont want to use the libraries).

The principle is:

1.)Load the file via Ajax, get the response, and use AudioContext.decodeAudioData saved to a variable.

2.)Create an audio context, and instead connecting it straight to .destination, add a a convolver using the .createConvolver()

The audioContext api documentation would help you a lot:

https://developer.mozilla.org/en-US/docs/Web/API/AudioContext.createConvolver

like image 90
Ofer Haber Avatar answered Oct 03 '22 21:10

Ofer Haber