DSPRelated.com
Forums

simple sound algorithms

Started by Unknown March 24, 2006
Hello,
I have written a simple sound editor for my university project that can
read a .Wav file and saves its format and wave form data in arrays. Now
I want to add capability to perform some effect on waveform data .I
have written a Fade-In/Fadeout effect myself. but when I tried to find
algorithms for other effects in internet I got confused! I almost know
nothing about DSP or advanced sound programming. Can anybody introduce
me some resources for algorithms that perform effects on raw sample
data (like as in a wave file)? effects like echo,delay
dissolve,equalization, or any simple one..
Thanks a lot
Alireza Ghasemi

perhaps audacity source code might be a good resource.

foolad.ir@gmail.com wrote:
> Hello, > I have written a simple sound editor for my university project that can > read a .Wav file and saves its format and wave form data in arrays. Now > I want to add capability to perform some effect on waveform data .I > have written a Fade-In/Fadeout effect myself. but when I tried to find > algorithms for other effects in internet I got confused! I almost know > nothing about DSP or advanced sound programming. Can anybody introduce > me some resources for algorithms that perform effects on raw sample > data (like as in a wave file)? effects like echo,delay > dissolve,equalization, or any simple one.. > Thanks a lot > Alireza Ghasemi >
What language are you programming in? The musicdsp source archive is a good place to start. http://www.musicdsp.org/ Also check out the links page. There is a ~lot~ of audio dsp code out there! I strongly recommend Csound, if you are comfortable with sometimes arcane C. But you will benefit from one or more textbooks as well. For example, Look for F.R. Moore, "Elements of Computer Music", has both theory and lots of C code (old-fashioned style though). And K Steiglitz, "A digital Signal Processing primer". With respect to delay: if you know how to implement a simple FIFO circular buffer, you know how to implement a delay line. More interesting is one where the delay time is variable over time. Then you add feedback... Richard Dobson
foolad.ir@gmail.com schrieb:

> Hello, > I have written a simple sound editor for my university project that can > read a .Wav file and saves its format and wave form data in arrays. Now > I want to add capability to perform some effect on waveform data .I > have written a Fade-In/Fadeout effect myself. but when I tried to find > algorithms for other effects in internet I got confused! I almost know > nothing about DSP or advanced sound programming. Can anybody introduce > me some resources for algorithms that perform effects on raw sample > data (like as in a wave file)? effects like echo,delay > dissolve,equalization, or any simple one..
There are tutorials for DSP processors that explain this. I think you can understand the language used, it's very straight forward algebraic assembler: http://www.analog.com/UploadedFiles/Application_Notes/7056820721065L_Audio_Tutorial.pdf http://www.harmony-central.com might be another good resource. Regards, Andor
foolad.ir@gmail.com wrote:
> Hello, > I have written a simple sound editor for my university project that can > read a .Wav file and saves its format and wave form data in arrays. Now > I want to add capability to perform some effect on waveform data .I > have written a Fade-In/Fadeout effect myself. but when I tried to find > algorithms for other effects in internet I got confused! I almost know > nothing about DSP or advanced sound programming. Can anybody introduce > me some resources for algorithms that perform effects on raw sample > data (like as in a wave file)? effects like echo,delay > dissolve,equalization, or any simple one.. > Thanks a lot > Alireza Ghasemi
You might think it's a little bit extreme, but a convolution function might help. With convolution, you can do such things as echo, delay, band filtering/equalization. the only problem is that even if you had the convolution function (I got some written in C99 if you want) you'd still need to understand how it works, but it's not so complicated I guess and anyways it saves you the trouble of having to make a whole new function for each new effect you want to try. Of course, that would only allow you to do what can be done with convolution, but that's already quite alot.