?
Solved

Applying Echo and Reverb effect

Posted on 2006-04-25
4
Medium Priority
?
217 Views
Last Modified: 2012-05-07
Dear Experts,

We have a LPVOID type of buffer which stores data corresponding 1 second of a wave file( 16 bit, 2 channel  and 44.1Khz).
That is, at one time it stores 176400 bytes of audio data.
Kindly let me know the algorithm of applying Echo and Reverb effect on the one second buffer.

Regards,
Mayank
0
Comment
Question by:HanuSoftware
2 Comments
 
LVL 4

Accepted Solution

by:
chip3d earned 500 total points
ID: 16542229
You can find information an this page: http://www.harmony-central.com/Effects/audio-effects-faq-10.txt (also code examples)
0
 
LVL 22

Assisted Solution

by:grg99
grg99 earned 500 total points
ID: 16542518
Echo  algorithm:

EchoSpacing := EchoSeconds * SampleRate;  EchoVolume := 0.3333;

for i := 0 to TheEnd - EchoSpacing do  data[ i + EchoSpacing ] += data[ i ] * EchoVolume;

Reverb is the same, only repeated at decreasing volume:

EchoSpacing := EchoSeconds * SampleRate;  EchoVolume := 0.3333;  ReverbTimes := 5;

for i := 0 to TheEnd - EchoSpacing do  
                  Rvol := EchoVolume; Where := i + EchoSpacing;
                  for j := 1 to ReverbTimes do
                         data[ Where ] += data[ i ] * RVol;
                         RVol /= EchoVolume;  Where += EchoSpacing;
                  EndFor
EndFor



0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question